variables.scss 759 Bytes
/*需要切换的颜色变量*/
$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;
  }
}