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" removes <symbol> elements #417

Open
nhoizey opened this issue Dec 13, 2022 · 1 comment
Open

"Inline styles" removes <symbol> elements #417

nhoizey opened this issue Dec 13, 2022 · 1 comment

Comments

@nhoizey
Copy link

nhoizey commented Dec 13, 2022

I'm trying to optimize the logo available here: https://nicolas-hoizey.photo/ui/logo.svg

"Inline styles" is active by default, so it should be pretty safe, but it removes the <symbol> elements and their contents:

CleanShot 2022-12-13 at 11 49 09

I don't know if it's a bug in SVGO or SVGOMG. I couldn't find a relevant issue or PR in SVGO's repository.

@nhoizey nhoizey changed the title "Inline styles" removes <symbol> emeveù "Inline styles" removes <symbol> elements Dec 13, 2022
@nhoizey
Copy link
Author

nhoizey commented Dec 13, 2022

It looks like it's an issue in SVGO directly. I tried with SVGO CLI, and it also removes the <symbol>s.

It doesn't with this configuration removing the inlineStyles plugin:

module.exports = {
  plugins: [
    {
      name: 'preset-default',
      params: {
        overrides: {
          inlineStyles: false,
        },
      },
    },
  ],
};

I'll open an issue on SVGO and link it here.

Should I keep this one open?

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

No branches or pull requests

1 participant