14 lines
428 B
SCSS
14 lines
428 B
SCSS
|
// Mixin that generates css variables
|
||
|
// If the variable has no prefix, don't assign anything to the $prefix attribute, leave its default value: “”
|
||
|
@mixin generate-css-variables($map, $prefix: "") {
|
||
|
@if $prefix == "" {
|
||
|
@each $name, $value in $map {
|
||
|
--#{$name}: #{$value};
|
||
|
}
|
||
|
} @else {
|
||
|
@each $name, $value in $map {
|
||
|
--#{$prefix}-#{$name}: #{$value};
|
||
|
}
|
||
|
}
|
||
|
}
|