variables.scss
759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*需要切换的颜色变量*/
$style-el--color-demo: transparent;
$style-el--color-demo1:red;
/* element颜色值声明
* 统一前缀 $style-el
* 后接element中变量值
*/
$style-el--color-primary: #C2915F;
$style-el--color-white: #ffffff;
/*定义方法*/
@mixin color_primary() {
/*判断匹配*/
[data-theme="theme0"] & {
background-color: $style-el--color-demo;
}
[data-theme="theme1"] & {
background-color: $style-el--color-demo1;
}
}
// tab组件
@mixin tabs_color() {
[data-theme="theme0"] & {
color: #fff;
text-shadow: 0 1px 2px rgb(0 0 0 / 50%);
}
}
// dialog组件
@mixin dialog_color() {
[data-theme="theme0"] & {
background: linear-gradient(218deg, #0c386b 0%, #051934 100%);
color: #fff;
}
}