Closed salvaft closed 5 months ago
astro-icon
No response
Astro v4.2.5 Node v20.11.0 System Linux (x64) Package Manager pnpm Output static Adapter none Integrations @astrojs/tailwind astro-icon
Colors defined in defs like gradients not working properly
Looks like only the first one is considered. Related to: https://github.com/svg/svgo/issues/1896 and https://svgo.dev/docs/plugins/cleanup-ids/
defs should mantain svg style
Disabling some svgo plugins fixes the issue
export default defineConfig({ integrations: [ icon({ svgoOptions: { plugins: [ { name: "preset-default", params: { overrides: { cleanupIds: false, }, }, }, ], }, }) ], }, })], });
https://stackblitz.com/edit/github-xzukxg?file=src%2Fpages%2Findex.astro
What version of
astro-icon
are you using?No response
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Colors defined in defs like gradients not working properly
Looks like only the first one is considered. Related to: https://github.com/svg/svgo/issues/1896 and https://svgo.dev/docs/plugins/cleanup-ids/![image](https://github.com/natemoo-re/astro-icon/assets/117351089/bbaa9ea2-11cc-498b-84fd-e20c176a531b)
What's the expected result?
defs should mantain svg style
Disabling some svgo plugins fixes the issue
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xzukxg?file=src%2Fpages%2Findex.astro