4 ms·
We can use SVG images/sprites with an alt="" attribute.
by progval 10y ago
We can use SVG images/sprites with an alt="" attribute.
- pseudosavant 10y agoWhile that is probably 'better' how in practice does it matter. SVG (esp with sprints) vs icon font are basically the same. Both are ways of embedding multiple vector images in one resource that you attribute meaning to using `title` attributes. In practice they will behave pretty much exactly the same.
- matthewmacleod 10y agoThere are still some issues with that – for example, it's easier to change attributes like text colour when using an icon font, something that becomes substantially more awkward with SVG. This is appropriate for things like buttons and other elements with hover effects.
- Theodores 10y agoJust inherit the colour, in the spritesheet use: fill: currentColor; Same with stroke. Works great.