Re:Icon fonts and their usefulness in iOS development
by pyre on Tuesday October 16, 2012 @10:51PM
(#4662969)
Can you do sprites with a svg, though? If not, there's the single file aspect.
[ Parent
| on HN ]
Re:Icon fonts and their usefulness in iOS development
by sahaskatta on Tuesday October 16, 2012 @10:56PM
(#4662986)
I 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.
Re:Icon fonts and their usefulness in iOS development
by ygra on Wednesday October 17, 2012 @04:54AM
(#4663663)
You 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.
Re:Icon fonts and their usefulness in iOS development
by rimantas on Wednesday October 17, 2012 @01:26AM
(#4663257)
Check out this: http://simurai.com/post/20251013889/svg-stacks