Hacker News new | ask | show | jobs
by grenoire 3130 days ago
Unfortunately you cannot reuse the icons that way, which does end up being wasteful unless you use compression.
3 comments

I believe you can define a <symbol> in one inline SVG, then <use> it in another, so that'd be a way to achieve icon reuse. Not sure how good browser support is for that, though - there's probably quirks.
That’s incorrect. You definitely can reuse them using symbol and defs/use.
You can reuse inline icons with JS - for example if you made a react component of it.