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

Nuxt-Icon applies classes to all imported svgs using svgo #50

Open
hhhhaaarry opened this issue Oct 3, 2023 · 2 comments
Open

Nuxt-Icon applies classes to all imported svgs using svgo #50

hhhhaaarry opened this issue Oct 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@hhhhaaarry
Copy link

Describe the bug
I'm using nuxt-icon for my icons, but i tried to use svgo to import a custom svg (not icon, illustration). The issue is that nuxt-icon is adding .nuxt-icon and .nuxt-icon--fill to the svg breaking his original fill.

Here is my nuxt.config

modules: ['woonuxt-settings', 'nuxt-graphql-client', '@nuxtjs/tailwindcss', 'nuxt-icon', '@nuxt/image', '@nuxtjs/i18n', '@pinia/nuxt', '@nuxtjs/device', 'nuxt-svgo'],
svgoOptions: {
svgo: true,
defaultImport: 'component',
svgoConfig: {
multipass: true,
removeViewBox: false,
},
},

@hhhhaaarry hhhhaaarry added the bug Something isn't working label Oct 3, 2023
@willaCS
Copy link

willaCS commented Oct 10, 2023

They should remove the style or at least have an option to remove them as you can't use tailwind on them as the style will always prevail over tailwind classes. :/

@baixiaoyu2997
Copy link

baixiaoyu2997 commented Feb 21, 2024

when using nuxt-svgo, you can set filled solve this problem
https://nuxt.com/modules/nuxt-svgo#component-props

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants