Switching to different style of theme selection

This commit is contained in:
Fabian Stamm
2020-03-27 11:04:50 +01:00
parent 2835b1bac9
commit 67478113cb
15 changed files with 326 additions and 282 deletions

View File

@ -1,6 +1,7 @@
@import "./_vals.scss";
$ns: "" !default;
$name: false !default;
$background: false !default;
$on-background: false !default;
@ -11,26 +12,31 @@ $on-button: #000000 !default;
@error ("background and on-background must be set!");
}
:root {
@if $name==false {
@error ("name must be set!");
}
$theme: #{$name}-theme;
::root {
--background: #{$background};
--on-background: #{$on-background};
}
.background-default {
.#{$theme} .background-default {
background: $background;
}
@each $dp in $elevations {
.elv-#{$dp} {
.#{$theme} .elv-#{$dp} {
@include Elevation($dp, false);
}
.elv-#{$dp}-imp {
.#{$theme} .elv-#{$dp}-imp {
@include Elevation($dp, true);
}
}
.elv-transition {
.#{$theme} .elv-transition {
@include ElevationTransition();
}