Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

暗黑模式下,[data-theme=dark] 优先级不够,导致暗黑模式下的颜色失效 #28

Open
lcyh opened this issue Mar 19, 2023 · 5 comments

Comments

@lcyh
Copy link

lcyh commented Mar 19, 2023

e956410bb7f423bdf51d032c10c02955

暗黑主题模式下,背景色被覆盖了,导致没生效

37aad6e634776cf10f8a0d23c6bad9c0

如何在其前面加 html[data-theme=dark]提高优先级?

@lcyh
Copy link
Author

lcyh commented Mar 19, 2023

viteThemePlugin()函数里的几个api都试,比如:resolveSelector,wrapperCssSelector,打包出来看没生效,请问具体怎么配置,提高[data-theme=dark] 的css权重优先级?

@YueCHEN195
Copy link

我也遇到了同样的问题,style 标签 加了scoped之后暗色的权重就不够了,请问你解决了吗?

@woodsZero
Copy link

viteThemePlugin()函数里的几个api都试,比如:resolveSelector,wrapperCssSelector,打包出来看没生效,请问具体怎么配置,提高[data-theme=dark] 的css权重优先级?

大佬解决了吗?我也碰到了这个
image
本地环境有data-v,打包后没了
image

@lcyh
Copy link
Author

lcyh commented Jul 5, 2023 via email

@woodsZero
Copy link

已收到,谢谢
大佬,请问解决了吗?怎么解决的呀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants