shakyShane / gulp-svg-sprites

Create SVG sprites or compile to <symbols>
MIT License
334 stars 45 forks source link

Prevent PNG fallback being added to the CSS file #63

Closed adam-lynch closed 9 years ago

adam-lynch commented 10 years ago

Not a big deal but I just noticed the following in the resultant CSS:

.no-svg .icon:before {
  background-image: url("../spritesheet.png");
}

I don't need any PNG fallback. I didn't see any option to disable this.


Out of curiousity, if I was using a PNG fallback, shouldn't it be possible to customize this bit of CSS? .no-svg looks like a class that Modernizr would add.

danieldiekmeier commented 10 years ago

Well, you could use a custom template: https://github.com/shakyshane/gulp-svg-sprites#advanced-custom-templates

I think that the standard template just wants to provide a basic version that works for "everyone", but with the custom templates, you can do exactly whatever you want.

adam-lynch commented 10 years ago

That's fair. I assumed that the template was just scoped to an icon. If it's all in the template then sure close this if you want.

shakyShane commented 9 years ago

@danieldiekmeier :+1: