📜  sass 创建颜色实用程序类 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:50.508000             🧑  作者: Mango

代码示例1
@mixin modifiers($map, $attribute, $prefix: '-', $separator: '-', $base: 'base') {
  @each $key, $value in $map {
    &#{if($key != $base, #{$prefix}#{$key}, '')} {
      @if type-of($value) == 'map' {
        @include modifiers($value, $attribute, $separator);
      }
      @else {
        #{$attribute}: $value;
      }
    }
  }
}