@use 'sass:map'; @use 'sass:meta'; @use 'iro-sass/src/bem'; @use 'iro-sass/src/props'; @use 'config'; @use 'core.vars' as vars; @forward 'core.vars'; @mixin styles { @each $theme-name, $theme in vars.$themes { @if $theme-name == config.$theme-default { :root { @include props.materialize(map.values(meta.module-variables('vars'))); @if map.has-key($theme, 'dark') { @media (prefers-color-scheme: dark) { @include props.materialize(map.get($theme, 'dark')); } } } } @else { @include bem.theme($theme-name) { @include props.materialize(map.get($theme, 'light')); @if map.has-key($theme, 'dark') { @media (prefers-color-scheme: dark) { @include props.materialize(map.get($theme, 'dark')); } } } } } }