icons.html: reduce size by 54%
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
* use `<use/>` instead of `<use></use>`
Should perhaps be avoided: https://github.com/prettier/prettier/issues/15336
- use
<use/>instead of<use></use>Should perhaps be avoided: prettier/prettier#15336
Self-closing tags are already used, e.g.
https://github.com/pradyunsg/furo/blob/83c3446288014357bb8a7875bb81b664b7f15896/src/furo/theme/furo/partials/icons.html#L54
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>)
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.
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).
@pradyunsg would you accept this as is or do you want to merge it exclusively with tooling? I cannot work on tooling unfortunately.