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

将css属性值改为var变量 #1063

Open
deajax opened this issue Jan 25, 2024 · 0 comments
Open

将css属性值改为var变量 #1063

deajax opened this issue Jan 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@deajax
Copy link

deajax commented Jan 25, 2024

背景

可以自定义主题色、方便修改各组件属性值。

期望

将css部分声明中的属性值改为css函数变量,以组件名称/属性/功能等为单位命名,并赋予其默认属性。

思路

color: #ffffff; 改为 color: var(--white-color, #fff);
background-color: #1677ff; 改为 background-color: var(--primary-color, #1677ff);
padding: 4px 12px; 改为 padding: var(--ant-button-vertical-padding, 4px) var(--ant-button-horizontal-padding, 12px);
font-size: 16px; 改为 font-size: var(--ant-button-default-font-size, 16px);

@deajax deajax added the enhancement New feature or request label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant