Switching to different style of theme selection
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user