jakearchibald / svgomg

Web GUI for SVGO
https://jakearchibald.github.io/svgomg/
MIT License
5.75k stars 475 forks source link

"Inline styles" does not inline styles if they are used more than once #390

Open jamieburchell opened 1 year ago

jamieburchell commented 1 year ago

The option currently exists to inline styles, but it does not work if the class is used more than once. It makes sense from an optimisation point of view, but if you are optimising SVGs which will ultimately be inlined in HTML, sometimes it's desirable not to have any styles/classes that might leak. Arguably it's confusing to select "Inline styles" and find they are not.

There is apparently an option to support this: https://github.com/svg/svgo/pull/592#issuecomment-377788612

If this is not desirable, we'd need an option to create "unique" classes instead.

jbenzing commented 9 months ago

Hello, I'd like to +1 this one if I can.

I'm having style(fill) override issues. I appreciate the tool. It did a great job shrinking my files from the graphics software. Now I just need to go manually replace the styles.

image

codeflorist commented 6 months ago

Unfortunately this issue makes SVGOMG pretty unusable for SVGs, that are used inline.