17 lines
507 B
SCSS
17 lines
507 B
SCSS
@use "sass:map";
|
|
@use "variables";
|
|
|
|
// Applied Dmitry Borody's method for theming with modifications. - https://medium.com/@dmitriy.borodiy/easy-color-theming-with-scss-bc38fd5734d1
|
|
@mixin themed($themes: variables.$themes) {
|
|
@each $theme, $vars in $themes {
|
|
.theme-#{$theme} &, &.theme-#{$theme} {
|
|
$theme-values: $vars !global;
|
|
@content;
|
|
$theme-values: null !global;
|
|
}
|
|
}
|
|
}
|
|
|
|
@function color-of($type) {
|
|
@return map.get($theme-values, $type);
|
|
} |