shrpne / vue-inline-svg

Dynamically loads an SVG source and inline <svg> element so you can manipulate the style of it
MIT License
177 stars 22 forks source link

Remove style-element from svg #59

Closed manuelkling closed 3 months ago

manuelkling commented 1 year ago

Hey guys, thank you for this great component!

When you export svgs f.e. with Adobe Illustrator, there is always a style-element in the svg giving the path a color. At the moment we just delete it manually. Would be great to have a prop like "removeStyle" to look for it inside the svg and remove when importing it. What do you think?

shrpne commented 3 months ago

Thank you for suggestion. But i'm trying to keep the library minimal, I guess this option will not be used much, since having redundant code in SVG markup is bad for performance reason, and preprocessing SVG sources by cleaning them is good idea.

Anyway you can workaround it by using transformSource function to remove style