nuxt-icons icon indicating copy to clipboard operation
nuxt-icons copied to clipboard

Nuxt-Icon applies classes to all imported svgs using svgo

Open hhhhaaarry opened this issue 2 years ago • 4 comments

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 avatar Oct 03 '23 15:10 hhhhaaarry

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. :/

willaCS avatar Oct 10 '23 19:10 willaCS

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

baixiaoyu2997 avatar Feb 21 '24 09:02 baixiaoyu2997

Try to add :fontControlled="false". I can't find any other setting to disable this globally.

StasNemy avatar Jun 18 '24 10:06 StasNemy