drdk / grunt-dr-svg-sprites

Grunt plugin to create SVG sprites with PNG fallbacks at needed sizes
113 stars 19 forks source link

Request: option for cssPrefix #12

Closed benfrain closed 10 years ago

benfrain commented 10 years ago

I like to export the generated CSS as sass. It's handling this fine with the cssSuffix. However, if I want it generated as a partial (rather than an outright file) I'm having to changes 234 of index.js to this:

var cssFileName = config.cssPath + "/_" + joinName(config.prefix, config.name, "sprites") + "." + config.cssSuffix;

It would be great if there was a 'cssPrefix' option so that users could set an underscore (or whatever) to the generated file.

Note: I'm aware of the existing prefix option but that results in illegal characters for the CSS selectors e.g. _thing-100 {}

phloe commented 10 years ago

Seems like a reasonable thing to implement - I'll have a look at it :)

phloe commented 10 years ago

options.cssPrefix is now live in v0.5.3

benfrain commented 10 years ago

Amazing :+1: