Repository navigation
Clean up icons - #1099
Clean up icons#1099
Conversation
|
Nice work! Did you try running the icons through https://jakearchibald.github.io/svgomg/ or SVGo to see if we could minify them? |
|
I think they're already minified by GitHub |
fregante
left a comment
There was a problem hiding this comment.
viewBox is necessary when we resize the SVGs via CSS. Rare but it happens. darkCompare for example has non-matching viewBox/width+height because it's used to align it better
|
Not sure if we considered this before, but why are we not using the official octicons package for the icons? |
|
@sindresorhus It suggested making the @bfred-it I only removed |
Can you check all the icons across the extension to see if they've changed? 😄 I remember that it was needed at some point for the merge commits, but now that has changed #1052 However this might be a moot point if we follow @jgierer12's good suggestion, we can probably just |
Did it. I didn't notice any visual changes. During my "reasearch" (sarching for the icon names in the project) I also found that the
I would for now merge this (as it's definitely an improvement) and open a new issue (probably a |
|
When in doubt, blame @hkdobrev |

While working on a new feature that required me to add a new icon I noticed that the
source/libs/icons.jsfile was pretty messy and decided to clean it up.To do that, I ...
versionattribute from all<svg>tags (user agents ignore it)xmlnsattribute (user agents ignore it as well)viewBoxattribute from<svg>tags when it was0 0 [width] [height](= redundant)aria-labeltag from all<svg>tags (icons can be used in multiple contexts)aria-hiddenattribute to all<svg>tagsroleattribute from all<svg>tags (useless witharia-hidden)These changes make the file more readable and reduce the amount of code RGH inserts into the DOM.