cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
207 stars 51 forks source link

scss formatter strips mandatory attributes from svg root #105

Closed fgiust closed 4 years ago

fgiust commented 4 years ago

When generating a scss stylesheet the plugins remove any attribute from the svg root elements, breaking the rendering of many svgs. As an example, starting from the following svg:

the root element gets changed to

resulting in a totally transparent svg. For other sprites that declares fill="none" I am also getting additional black fills when this attribute gets removed the attached patch adds cloning of root attributes to generated svgs: [svg-spritemap-webpack-plugin+3.5.4.txt](https://github.com/cascornelissen/svg-spritemap-webpack-plugin/files/4262249/svg-spritemap-webpack-plugin%2B3.5.4.txt) .
cascornelissen commented 4 years ago

@fgiust, some of the (I guess) images in your description are missing. Could you fix those so that I can see what the problem is?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.