GitOfZGT/vite-plugin-theme-preprocessor

vite-plugin-theme-preprocessor and ElementPlus

naftis opened this issue · 5 comments

I'm not sure if this is an issue of the library but I'm having problems when using this with ElementPlus.

Example repository: https://github.com/naftis/element-plus-theming (based on this: https://github.com/element-plus/element-plus-vite-starter)
Error: Some CSS variables don't get loaded
image

How should I configure ElementPlus to work with this library? I load this file in multipleScopeVars: https://github.com/naftis/element-plus-theming/blob/master/src/styles/theme/default.scss with @forward but all of the CSS variables don't load.
It seems like every variable changed in @forward seem to get unloaded.

Thanks for your feedback.
I fixed it in @zougt/some-loader-utils v1.3.5,Please reinstall @zougt/vite-plugin-theme-preprocessor.
image

Hello, example repository: https://github.com/naftis/element-plus-theming
For some reason it doesn't work properly when changing the theme here:
image

The background should go black, and the "Tag 1" has undefined CSS variables 🤔
image

Thank you very much for help.

You should use toggleTheme on this way:

image

To

image

@GitOfZGT Thank you :) I fixed that.

https://goofy-booth-e1e803.netlify.app/ the element-plus primary color works in the navigation:
image
image

There is another issue though, the Button colors don't change to pink:
image
image

It seems to add the variables to style -attribute:
image
Do you think this is element-plus issue or vite-plugin-theme-preprocessor issue?

element-plus issue or vite-plugin-theme-preprocessor issue?

I also found this problem some time ago, that is element-plus did, theme plugin can not change it, see element-plus/element-plus#4263