2 ms·
> I’m not sure where that trend comes from, but it’s obnoxious. (1) The options for controlling the style of SVG elements (e.g. on hover) are not great.[0] In
by csnover 6y ago
> I’m not sure where that trend comes from, but it’s obnoxious.
(1) The options for controlling the style of SVG elements (e.g. on hover) are not great.[0] In contrast, font icons can be styled as easily as any other text.
(2) Font files are usually smaller than their SVG counterparts.
(3) Font rendering is faster than SVG rendering.
(4) IE did not support SVG until version 9, but supported custom fonts since version 5.
(5) Old browsers that did support SVG had serious issues with SVG sprite maps, ranging from creating duplicate rasterisations of the entire SVG file in memory for every use of the same file in a document, to not caching the rasters at all and regenerating them every time they needed to be repainted (e.g. during scrolling). These are fixed now, but inertia is what it is.
[0] https://css-tricks.com/change-color-of-svg-on-hover/ https://css-tricks.com/change-color-of-svg-on-hover/