Y
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
EvilTerran
3130 days ago
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.
link
freshyill
3130 days ago
That’s incorrect. You definitely can reuse them using symbol and defs/use.
link
thinkloop
3130 days ago
You can reuse inline icons with JS - for example if you made a react component of it.
link