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

是否有方法提升 dumi 主题样式的权重 #1862

Open
x011223 opened this issue Aug 28, 2023 · 3 comments
Open

是否有方法提升 dumi 主题样式的权重 #1862

x011223 opened this issue Aug 28, 2023 · 3 comments
Labels
PR Welcome question Further information is requested

Comments

@x011223
Copy link

x011223 commented Aug 28, 2023

antd v4 版本 引入样式后 会覆盖 dumi的样式,但是 v5 不会,是否有方法提升 dumi 主题样式的权重。

试了一下 样式覆盖,但是目前只发现 h 标签 的问题,还不确定 其他的样式是否有异常,所以想着 提升 dumi 样式权重一次性解决。

demo

antd v4

image

antd v5

image

@x011223 x011223 added the question Further information is requested label Aug 28, 2023
@github-actions
Copy link

Hello @xiyangranhongyan. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @xiyangranhongyan,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@PeachScript
Copy link
Member

dumi 需要主动设置一下标题标签在亮色和暗色模式下的文本颜色,避免被 antd 的全局样式影响

关键代码位置:


color: @c-text;
@{dark-selector} & {
color: @c-text-dark;
}

@hga97
Copy link

hga97 commented Nov 5, 2024

遇到一样的问题了,antd v4的global.less覆盖dumi的主题样式了,导致黑暗模式有些内容显示不出来。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR Welcome question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants