@import './config.scss'; @import './function.scss'; @import '../theme.scss'; @mixin go($block) { $B: $namespace + '-' + $block; .#{$B} { @content; } } @mixin when($state) { @at-root { &.#{$state-prefix + $state} { @content; } } } @mixin themeify { @each $theme-name, $theme-map in $themes { $theme-map: $theme-map !global; [data-theme='#{$theme-name}'] & { @content; } } } @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); } }