saeedalipoor / icono

One tag One icon, no font or svg, Pure CSS
http://git.io/icono
MIT License
4k stars 301 forks source link

Import individual icons #51

Open jkjustjoshing opened 5 years ago

jkjustjoshing commented 5 years ago

I'm using SCSS in my project, and I want to be able to pull in individual icons to reduce my final payload size. Right now, the SCSS icon files rely on being pulled into icono.scss so the variables.scss, mixins.scss, and functions.scss files are in-scope. Importing one of them individually won't work.

I'd like to see an inversion of control, where each partial file pulls in everything it needs. This way a developer can pull in everything, or only what they need.

This could/should actually be implemented for all languages: Stylus, LESS, and even the vanilla CSS output (provide a minified master file, and then individual files for each icon type).

jkjustjoshing commented 5 years ago

This would be a fairly straightforward change - I'd be willing to submit a PR for this if you'd consider it, @saeedalipoor.

saeedalipoor commented 5 years ago

I'm thinking about this structure but couldn't make time to do that, and it's great if you have time for that. I'm open to any contributions and thank you for that.