Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

sass create color utility classes

@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;
      }
    }
  }
}
Source by frontstuff.io #
 
PREVIOUS NEXT
Tagged: #sass #create #color #utility #classes
ADD COMMENT
Topic
Name
2+9 =