55 lines
872 B
SCSS
Raw Normal View History

@import './config.scss';
2021-12-15 22:16:16 +08:00
@import './function.scss';
@import '../theme.scss';
@mixin go($block) {
2021-12-15 22:16:16 +08:00
$B: $namespace + '-' + $block;
.#{$B} {
@content;
}
}
2021-12-15 22:16:16 +08:00
@mixin when($state) {
@at-root {
&.#{$state-prefix + $state} {
@content;
}
}
}
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-15 22:16:16 +08:00
@mixin fetch-theme($param) {
@include themeify {
#{$param}: themed($param);
}
}
//获取背景颜色
@mixin filter-color($target) {
@include themeify {
background-color: themed($target);
}
}
//获取背景渐变颜色
@mixin background-image($target) {
@include themeify {
background-image: themed($target);
}
}
//获取字体颜色
@mixin font-color($target) {
@include themeify {
color: themed($target);
}
}