props/Props/assets/styles/_themer.scss

17 lines
507 B
SCSS
Raw Normal View History

@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);
}