Hacker News new | ask | show | jobs
by freshyill 3129 days ago
They aren't all under 1KB, but there a few repos on GitHub hosting all of the Font Awesome icons as SVG.

Also, if you can avoid it, don't use <img src… to display SVG images, as the article suggests. By using <svg… directly, you avoid extra requests, you gain the ability to manipulate them directly in the DOM, and to restyle them.

https://github.com/ivanvotti/font-awesome-svg/tree/master/SV...

1 comments

Unfortunately you cannot reuse the icons that way, which does end up being wasteful unless you use compression.
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.