svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
648 stars 43 forks source link

Solution for PNG-fallback #11

Closed thasmo closed 9 years ago

thasmo commented 9 years ago

Is there currently a solution for using/configuring a PNG-fallback? It's easy to create PNG images using the gulp-raster plugin but the more difficult part is to get the additional styles into the CSS/SASS file.

I've seen it's possible to use custom templates for rendering stylesheet files in the documentation of svg-sprite, but it's not mentioned anywhere how to configure them.

Thanks!

jkphl commented 9 years ago

Hey @thasmo,

this is exactly what node-iconizr is for. I'm currently working on a complete rewrite that will be based on the 1.x svg-sprite release, but I'm not finished yet. (It's working already, but there are no tests and no documentation yet.) Also, there hasn't been a Gulp wrapper for iconizr so far, but there will be. I should be finished within the next two weeks I guess. Please stay tuned! :)

I've seen it's possible to use custom templates for rendering stylesheet files in the documentation of svg-sprite, but it's not mentioned anywhere how to configure them.

It's simple, please see here.

Cheers, Joschi

thasmo commented 9 years ago

Thanks! :)