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

✨ [Feature]: 能否在 Color 板块让开发者动态切换各个样式颜色,并将可见效果同步到其他板块(如“Primary 按钮样式”) #323

Open
KunIsMe opened this issue Aug 11, 2023 · 1 comment

Comments

@KunIsMe
Copy link

KunIsMe commented Aug 11, 2023

What problem does this feature solve

可以使开发者在颜色板块中,点击各个样式颜色变量调出色板,动态切换颜色并同步更新到全局,使在其他版块下都可以看到当前效果。
例如:
image
更改 primary 主要底色颜色变量后,譬如可以在 Button 按钮组件中看到“主要按钮“颜色发生改变。
image

What does the proposed API look like

动态更改全局定义的颜色变量(如:使用 css 变量示例)
document.documentElement.style.setProperty('--primary-color', '#000');

@Simplelegant
Copy link
Collaborator

感谢建议,如果感兴趣可以参与贡献哦

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

No branches or pull requests

2 participants