2021-12-14 15:53:30 +08:00
|
|
|
@import './config.scss';
|
2021-12-15 22:16:16 +08:00
|
|
|
@import './function.scss';
|
2021-12-16 13:33:04 +08:00
|
|
|
@import '../theme.scss';
|
2021-12-14 15:53:30 +08:00
|
|
|
|
|
|
|
@mixin go($block) {
|
2021-12-15 22:16:16 +08:00
|
|
|
$B: $namespace + '-' + $block;
|
2021-12-14 15:53:30 +08:00
|
|
|
.#{$B} {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-20 21:25:35 +08:00
|
|
|
@mixin goId($block) {
|
|
|
|
$B: $namespace + '-' + $block;
|
|
|
|
##{$B} {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-19 19:19:46 +08:00
|
|
|
@mixin deep() {
|
2022-01-05 18:04:41 +08:00
|
|
|
:deep {
|
2021-12-19 19:19:46 +08:00
|
|
|
@content;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-15 22:16:16 +08:00
|
|
|
@mixin when($state) {
|
|
|
|
@at-root {
|
|
|
|
&.#{$state-prefix + $state} {
|
|
|
|
@content;
|
|
|
|
}
|
2021-12-14 15:53:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-15 22:16:16 +08:00
|
|
|
@mixin themeify {
|
|
|
|
@each $theme-name, $theme-map in $themes {
|
|
|
|
$theme-map: $theme-map !global;
|
|
|
|
[data-theme='#{$theme-name}'] & {
|
|
|
|
@content;
|
|
|
|
}
|
2021-12-14 15:53:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-15 22:16:16 +08:00
|
|
|
@mixin fetch-theme($param) {
|
|
|
|
@include themeify {
|
|
|
|
#{$param}: themed($param);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-13 18:01:33 +08:00
|
|
|
@mixin fetch-theme-custom ($key, $value) {
|
|
|
|
@include themeify {
|
|
|
|
#{$key}: themed($value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-15 22:16:16 +08:00
|
|
|
//获取背景颜色
|
2021-12-18 16:36:43 +08:00
|
|
|
@mixin filter-bg-color($target) {
|
2021-12-15 22:16:16 +08:00
|
|
|
@include themeify {
|
|
|
|
background-color: themed($target);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取背景渐变颜色
|
|
|
|
@mixin background-image($target) {
|
|
|
|
@include themeify {
|
|
|
|
background-image: themed($target);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-01-11 20:56:19 +08:00
|
|
|
//设置边框颜色
|
2021-12-18 16:36:43 +08:00
|
|
|
@mixin filter-border-color($target) {
|
|
|
|
@include themeify {
|
|
|
|
border-color: themed($target);
|
|
|
|
}
|
2021-12-19 19:19:46 +08:00
|
|
|
}
|
2021-12-21 10:06:03 +08:00
|
|
|
@mixin hover-border-color($target) {
|
|
|
|
@include themeify {
|
|
|
|
border: 1px solid themed($target);
|
|
|
|
}
|
|
|
|
}
|