props/Props/assets/scss/_themer.scss
Harrison Deng 57f67391f1 Switched to MPA powered by Razor Pages
After reconsidering where I want to take this project, I realized that a MPA is more fitting.
2021-07-24 00:03:32 -05:00

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