-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update svg-sprites.svg syntax #28
Comments
nikgavalas
added a commit
to nikgavalas/Font-Awesome-SVG-PNG
that referenced
this issue
May 5, 2015
Great suggestion and works really well.
So I've implemented this in by forked branch if you want it. Great suggestion. The icons show up more consistently centered and sized |
@nikgavalas Nice work! Would it affect #29 at all? |
@nikgavalas Could you do a PR? |
@nikgavalas @Rush Did this ever move? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I feel like the svg-sprites.svg file could do with a syntax update. Chris Coyier wrote a really good article about the syntax called SVG
symbol
a Good Choice for Icons. In it he describes this pattern for the svg sprite file:Reasons:
As Chris points out, there are some very good reasons for going with this markup style.
<title>
and<desc>
tags)viewBox
attribute should make consistent sizing very easy.<symbol>
was invented for anyway."I get that this will increase the file size (because of repetition over 519 icons), but GZIP eats this kind of character repetition for breakfast, so the performance hit shouldn't be all that severe.
Alternatively, all the
<paths>
could be wrapped inside a<defs>
tag, which should hide things properly, and the<svg>
itself could just be set todisplay: none;
. Like so:The text was updated successfully, but these errors were encountered: