gulp-svg-sprites
gulp-svg-sprites copied to clipboard
Strips out feDropShadow
For some reason the output is striping the filter definition I'm trying to use. Here is what I'm trying in the sources SVG:
<defs>
<filter id="shadow">
<feDropShadow dx="4" dy="8" stdDeviation="4"/>
</filter>
</defs>
<circle cx="29" cy="29" r="29" style="fill:#0091ca; filter:url(#shadow)"/>
But what gets created is this:
<defs>
<filter id="a"></filter>
</defs>
<circle cx="29" cy="29" r="29" fill="#0091ca" filter="url(#a)"></circle>
feDropShadow primitive isn't a part of SVG 1.1 spec, so SVGO removes it.
Try to disable removeUnknownsAndDefaults SVGO plugin in config:
svgSprite({
cleanconfig: {
plugins: [{removeUnknownsAndDefaults: false}]
}
})
But be careful: all other unknowns will not be removed too
Better use cleanupIDs: false in this case.