element-plus-nuxt-starter icon indicating copy to clipboard operation
element-plus-nuxt-starter copied to clipboard

Override SCSS variables doesn't work

Open nphungthinh2601 opened this issue 2 years ago • 2 comments

https://element-plus.org/en-US/guide/theming.html#by-scss-variables https://stackoverflow.com/questions/72512042/how-to-change-colors-of-a-tempa-element-plus-in-nuxt3 It doesn't work.

nphungthinh2601 avatar Oct 23 '22 01:10 nphungthinh2601

Check example?

YunYouJun avatar Oct 23 '22 16:10 YunYouJun

I have some code in ~/assets/scss/element-plus.scss

@forward 'element-plus/theme-chalk/src/common/var.scss' with ( $colors: ( 'primary': ( 'base': #ff8900, ), ) );

and nuxt.config.ts

css: ['~/assets/scss/element-plus.scss'], typescript: { strict: true, shim: false, }, // auto import components components: true,

vite: { plugins: [ Components({ resolvers: [ElementPlusResolver()], }), ], },

It look like ok but it doesn't work. I had tried clone your repo and override but it still doesn't work. Do you have any ideas on how I can improve the config file? Thanks a lot.

nphungthinh2601 avatar Oct 24 '22 01:10 nphungthinh2601

Hello, is there any solution for that? I face the same problem too.

pheng0077 avatar Jan 12 '23 11:01 pheng0077