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

Provide a css version that supports CSS Varaibles #16593

Closed
1 task
qiu8310 opened this issue May 15, 2019 · 1 comment
Closed
1 task

Provide a css version that supports CSS Varaibles #16593

qiu8310 opened this issue May 15, 2019 · 1 comment
Assignees

Comments

@qiu8310
Copy link

qiu8310 commented May 15, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

很多 antd 都是用在后台管理系统上,这些系统对兼容性要求不同,另外用了 CSS Variables,这些后台系统就可以实时在自己的系统上配置主题了。

另外也可以通过 postcss 插件将 CSS Variables 编译成兼容低版本的浏览器。

What does the proposed API look like?

https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties

@zombieJ
Copy link
Member

zombieJ commented May 15, 2019

antd 的颜色是由几个主色派生出来的。内部使用了 less 进行计算,不是单纯的几种颜色:https://ant.design/docs/react/customize-theme-cn#Ant-Design-%E7%9A%84%E6%A0%B7%E5%BC%8F%E5%8F%98%E9%87%8F

想要动态变更主题,可以参考 pro 的实现:https://preview.pro.ant.design

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

No branches or pull requests

2 participants