4 ms·
Can you do sprites with a svg, though? If not, there's the single file aspect.
by pyre 14y ago
Can you do sprites with a svg, though? If not, there's the single file aspect.
- sahaskatta 14y agoI just started using it icon fonts. I was initially using SVGs using an IMG tag, but the issue there is that you can't change color, opacity, or style it with CSS. You can sprite SVGs, but you have to maintain it just as you would have to maintain a sprite of PNGs. The only advantage being that a sprited SVG would scale to a HDPI monitor without needing a second set of higher resolution images. I ended up going with icon fonts because it requires significantly less CSS than dealing with the position of an icon in a sprite. I actually find it is easier to maintain since I can style icons with shadows, opacity, color, etc. One drawback, using icon fonts generally means having flat icons. You can't have fancy 3D-like iconography.
- rimantas 14y agoCheck out this: http://simurai.com/post/20251013889/svg-stacks http://simurai.com/post/20251013889/svg-stacks
- ygra 14y agoYou can reference a viewBox when referencing an SVG. This uses fragment notation in the URI. It would clash a little with a proposed syntax for native sprites for images (was recently brought up on the www-svg mailing list), I don't know whether or how it was resolved yet.