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

[BUG] dynamic theme, CSS Variable #245

Open
airlenet opened this issue Sep 19, 2022 · 1 comment
Open

[BUG] dynamic theme, CSS Variable #245

airlenet opened this issue Sep 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@airlenet
Copy link
Contributor

🐛 Bug 描述 Bug description

使用版本:"@ant-design-vue/pro-layout": "^3.2.3"

npmjs下载后的
@ant-design-vue/pro-layout/dist/style.css

中包含
.ant-btn-primary{color:#fff;border-color:#1890ff;background:#1890ff;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b}

希望 此文件包含的.ant-btn-primary等样式使用的是var方式引用,或者移除 ant-design-vue包含的样式。

.ant-btn-primary{background:var(--ant-primary-color);border-color:var(--ant-primary-color);box-shadow:0 2px 0 rgba(0,0,0,.045);color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.12)}

import '@ant-design-vue/pro-layout/dist/style.css'
import 'ant-design-vue/dist/antd.variable.min.css'
现在使用动态主题,需要先引用prod-layout再引用antd.variable.min.css,才能生效,而且,两个文件样式重复太多,发布后文件太大

🏞 期望结果 Desired result

希望 dist/style.css文件包含的.ant-btn-primary等样式使用的是var方式引用,或者移除 ant-design-vue包含的样式。

🚑 其他信息 Other information

@airlenet airlenet added the bug Something isn't working label Sep 19, 2022
@andrewgreat
Copy link

请教一下在3.x中如何在线动态切换主题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants