Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert an SVG file to one with embdedded styling properties?

I am using the flutter svg package and it doesn't support the <style> element that Illustrator exports an SVG with.

Is there a way I can convert this SVG to embed these styles into their respective elements? The style tag has a bunch of classes like cls-1, cls-2, etc.

Otherwise is there a way I can export an SVG without the <style> tag in Illustrator?

like image 642
Jiehfeng Avatar asked Dec 18 '25 07:12

Jiehfeng


1 Answers

Without going the conversion route, I've found a simple solution regarding Illustrator. When you export to an SVG, the dialog box that shows has a dropdown that let's you select Inline Attributes. This works with the flutter svg package perfectly.

like image 67
Jiehfeng Avatar answered Dec 21 '25 02:12

Jiehfeng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!