3 ms·
Is inline SVG always the fastest way to include a handful of icons?
by fareesh 6y ago
Is inline SVG always the fastest way to include a handful of icons?
- no_wizard 6y agoThere’s trade offs to all approaches though that is the easiest way to use them without too many downsides. I think CSS Tricks[0] article on this does a good job explaining the different ways to use SVG I like using the object tag for caching but it does have the downside of either having to inline style the svgs or load a style sheet separately for each one [0]https://css-tricks.com/using-svg/ https://css-tricks.com/using-svg/
- skrebbel 6y agoNot always, but if you want them to take over the surrounding text color, it's the only way iirc.
- KajMagnus 6y agoHere's a StackOverflow question-answer about inline vs not-inline SVG: https://stackoverflow.com/questions/23210126/inline-svg-vs-svg-file-performance https://stackoverflow.com/questions/23210126/inline-svg-vs-s... "Inline SVG vs SVG File Performance" (Hint: Sometimes. Depends on how many times they are repeated (if any), and how large they are, and how often your html / css etc contents changes ...)