Skip to content
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

Switch to SVG Icons #2

Closed
robneu opened this issue Dec 14, 2015 · 7 comments
Closed

Switch to SVG Icons #2

robneu opened this issue Dec 14, 2015 · 7 comments

Comments

@robneu
Copy link
Collaborator

robneu commented Dec 14, 2015

Right now we're using grunt-webfont to create a custom icon font using SVGs. After the switch to npm3 that library has been unreliable and borks the SVG files we use from themicons.

It seems like most of the web is moving away from icon fonts anyway, so I'd like to explore doing this within our themes. The top contender for this is Open Ionic which has a pre-compiled SVG sprite. The icon set is a little limited, but I don't think we need to use as many icons as we are right now. All we really need are some basics like search, menu, left and right arrows, etc.

robneu added a commit that referenced this issue Dec 14, 2015
Related to #2
@GaryJones
Copy link

With the HTTP/2 eventually not needing the number of requests to be reduced, you may get more flexibility and ease of development by just having the raw (optimized - SVGO) SVGs in a file and use them inline / as CSS background images.

@robneu
Copy link
Collaborator Author

robneu commented Dec 14, 2015

That seems like it would probably be a good option. The only thing that's really annoying about SVGs is that you can't control the fill when you use them as a CSS background image. :\

@robneu
Copy link
Collaborator Author

robneu commented Dec 14, 2015

This task looks interesting for automating SVG sprite generation.

@ctalkington
Copy link

been hitting the same issue with webfont, i've resorted to running 0.5.x and ignoring the woff2 error (running node 4.x LTS) since not currently using woff2.

im trying to work out the exact commit at which broke generation, it can clearly be seen when using the twitter svg from themicons.

@robneu
Copy link
Collaborator Author

robneu commented Dec 18, 2015

It seems to be related to this issue but overall the benefit of including a webfont builder in a theme seems outweighed by the aggravation of sorting out any bugs that crop up in the myriad of dependencies required for it to work.

Even if I don't switch over to SVGs entirely, the webfont task won't be re-appearing. I'll just pull in pre-compiled fonts if they're needed.

@ctalkington
Copy link

i will likely do the same in my own themes as i honestly only ever use 5 icons and nothing custom. icomoon or such can handle that use case if it crops up.

@robneu robneu added this to the 1.0 milestone Dec 19, 2015
@robneu
Copy link
Collaborator Author

robneu commented Dec 23, 2015

After experimenting a bit more with SVG icons on a recent project, I've decided that they're still just too annoying to be a practical replacement for an icon font right now.

They're definitely a handy tool and you can do some really awesome things with them, but they're still a royal pain in the ass to work with if you need control over the icon fill. Closing this out for now, but will revisit the idea again in the future.

@robneu robneu closed this as completed Dec 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants