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 Variables 实现配色主题等功能 #256

Closed
sivan opened this issue May 31, 2019 · 3 comments
Closed

考虑使用 CSS Variables 实现配色主题等功能 #256

sivan opened this issue May 31, 2019 · 3 comments
Labels
question Further information is requested

Comments

@sivan
Copy link
Member

sivan commented May 31, 2019

特性兼容度尚可,IE 有腻子 https://github.com/jhildenbiddle/css-vars-ponyfill
使用 CSS Variables 可以大幅减少配色主题所需要的代码。

@sivan sivan added the question Further information is requested label May 31, 2019
@sivan
Copy link
Member Author

sivan commented May 31, 2019

@liaoliaojun
Copy link

liaoliaojun commented Jul 10, 2019

$--color-primary: #409EFF !default;
$--color-primary-light-1: mix($--color-white, $--color-primary, 10%) !default; /* 53a8ff */

// transform
:root {
  --color-primary: #409EFF;
  --color-primary-light-1: ???
}

可以把sass中变量转换成css变量,但是如果某个变量有使用sass的方法,该变量就需要运行时编译。

@solarjoker
Copy link
Collaborator

support in 3.0.0

@solarjoker solarjoker mentioned this issue Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants