diff options
Diffstat (limited to 'src/_core.scss')
-rw-r--r-- | src/_core.scss | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/_core.scss b/src/_core.scss new file mode 100644 index 0000000..e1205c4 --- /dev/null +++ b/src/_core.scss | |||
@@ -0,0 +1,33 @@ | |||
1 | @use 'sass:map'; | ||
2 | @use 'sass:meta'; | ||
3 | @use 'iro-sass/src/props'; | ||
4 | @use 'themes'; | ||
5 | |||
6 | @use 'core.vars' as vars; | ||
7 | @forward 'core.vars'; | ||
8 | |||
9 | @mixin styles { | ||
10 | @each $theme-name, $theme in vars.$themes { | ||
11 | @if $theme-name == themes.$theme-default { | ||
12 | :root { | ||
13 | @include props.materialize(map.values(meta.module-variables('vars'))); | ||
14 | |||
15 | @if map.has-key($theme, 'dark') { | ||
16 | @media (prefers-color-scheme: dark) { | ||
17 | @include props.materialize(map.get($theme, 'dark')); | ||
18 | } | ||
19 | } | ||
20 | } | ||
21 | } @else { | ||
22 | @include iro.bem-theme($theme-name) { | ||
23 | @include props.materialize(map.get($theme, 'light')); | ||
24 | |||
25 | @if map.has-key($theme, 'dark') { | ||
26 | @media (prefers-color-scheme: dark) { | ||
27 | @include props.materialize(map.get($theme, 'dark')); | ||
28 | } | ||
29 | } | ||
30 | } | ||
31 | } | ||
32 | } | ||
33 | } | ||