Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jamieburchell opened this issue Oct 6, 2022 · 2 comments

Comments

@jamieburchell
Copy link

jamieburchell commented Oct 6, 2022

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:
svg/svgo#592 (comment)

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

@jamieburchell jamieburchell changed the title Add option to inline all styles, even if used more than once "Inline styles" does not inline styles if they are used more than once Oct 6, 2022
@jbenzing
Copy link

jbenzing commented Dec 6, 2023

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants