summaryrefslogtreecommitdiffstats
path: root/src/_core.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/_core.scss')
-rw-r--r--src/_core.scss53
1 files changed, 30 insertions, 23 deletions
diff --git a/src/_core.scss b/src/_core.scss
index 7b7a384..7be4b0d 100644
--- a/src/_core.scss
+++ b/src/_core.scss
@@ -9,30 +9,37 @@
9@forward 'core.vars'; 9@forward 'core.vars';
10 10
11@mixin styles { 11@mixin styles {
12 @each $theme-name, $theme in vars.$themes { 12 @each $theme-name, $theme in vars.$themes {
13 @if $theme-name == config.$theme-default { 13 @if $theme-name == config.$theme-default {
14 :root { 14 :root {
15 @include props.materialize(map.values(meta.module-variables('vars'))); 15 @include props.materialize(map.values(meta.module-variables('vars')));
16 16
17 @if map.has-key($theme, 'dark') { 17 @if map.has-key($theme, 'dark') {
18 @media (prefers-color-scheme: dark) { 18 @media (prefers-color-scheme: dark) {
19 @include props.materialize(map.get($theme, 'dark')); 19 @include props.materialize(map.get($theme, 'dark'));
20 } 20 }
21 } 21 }
22 } 22 }
23 } @else {
24 @include bem.theme(string.slice($theme-name, 3)) {
25 @include props.materialize(map.get($theme, 'light'));
26 23
27 color: props.get(vars.$theme, --text); 24 @if map.has-key($theme, 'dark') and config.$explicit-dark-theme {
28 background-color: props.get(vars.$theme, --bg-base); 25 @include bem.theme('dark') {
26 @include props.materialize(map.values(meta.module-variables('vars')));
27 @include props.materialize(map.get($theme, 'dark'));
28 }
29 }
30 } @else {
31 @include bem.theme(string.slice($theme-name, 3)) {
32 @include props.materialize(map.get($theme, 'light'));
29 33
30 @if map.has-key($theme, 'dark') { 34 color: props.get(vars.$theme, --text);
31 @media (prefers-color-scheme: dark) { 35 background-color: props.get(vars.$theme, --bg-base);
32 @include props.materialize(map.get($theme, 'dark')); 36
33 } 37 @if map.has-key($theme, 'dark') {
34 } 38 @media (prefers-color-scheme: dark) {
35 } 39 @include props.materialize(map.get($theme, 'dark'));
36 } 40 }
37 } 41 }
42 }
43 }
44 }
38} 45}