Skip to content

Conversation

@haampie
Copy link
Contributor

@haampie haampie commented Sep 17, 2025

since these icons are part of the HTML and aren't cached, it wouldn't hurt to reduce their size a bit

  • reduce the size of icons.html from 6330 to 2900 bytes (svgomg + manual fixes)
  • fix invalid <svg> nested inside <svg>
  • use <use/> instead of <use></use>
  • move ^ icon to icons.html
  • remove redundant xmlns= attribute from inline <svg> elements

@polyzen
Copy link
Contributor

polyzen commented Sep 17, 2025

* use `<use/>` instead of `<use></use>`

Should perhaps be avoided:
prettier/prettier#15336

@haampie
Copy link
Contributor Author

haampie commented Sep 17, 2025

  • use <use/> instead of <use></use>

Should perhaps be avoided: prettier/prettier#15336

Self-closing tags are already used, e.g.

<line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/>

See this comment by the person who created https://svgomg.net/, or more authoritatively the html spec which says it's not an error when in <svg>)

@pradyunsg
Copy link
Owner

Is there any way to ensure/enforce this? Without that, I'm certain that there'd be a regression around this the next time that the icons need any changes.

@haampie
Copy link
Contributor Author

haampie commented Sep 18, 2025

I'm not in the loop regarding web development tooling.

Just know about w3 validator (ancient) and svgo as an npm package (but I used the web interface).

@haampie
Copy link
Contributor Author

haampie commented Sep 30, 2025

@pradyunsg would you accept this as is or do you want to merge it exclusively with tooling? I cannot work on tooling unfortunately.

@pradyunsg
Copy link
Owner

@pradyunsg would you accept this as is or do you want to merge it exclusively with tooling? I cannot work on tooling unfortunately.

I'll take a stab at it. Thanks for flagging this BTW! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants