w0rm / gulp-svgstore

Combine svg files into one with symbol elements
https://www.npmjs.com/package/gulp-svgstore
645 stars 33 forks source link

<def><style> stops fill: anycolor #84

Closed w3debugger closed 7 years ago

w3debugger commented 7 years ago

I'm was trying to add color to icons but because of the <defs><style>.a{fill:#666}</style> I was unable to modify color. There should be a way to remove <defs></defs> after combining svg files.

w0rm commented 7 years ago

@w3debugger having style tags in svg icons is a bad idea, because all styles end up in the combined file, and may override each other.

So if you export/modify the icons to not have <style> in them, then this should fix the problem.

w3debugger commented 7 years ago

I'm removing <def><style> manually after runny gulp svgstore. This should be added in the script not manually. @w0rm

w0rm commented 7 years ago

It should not be added to the script, because this may result in damaged/improperly styled icons that depend on the styles. Icons with <style> should not be used with this method.