blob: 8b17af0b1992e7cf909622cefe89a8457bafff1e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
@use 'sass:list';
@use 'sass:map';
@use 'sass:meta';
@use 'sass:string';
@use 'config';
@use 'include-media/dist/include-media' as media;
@use 'iro-sass/src/bem';
@use 'iro-sass/src/props';
@mixin materialize-at-root($ref) {
@if meta.type-of($ref) == 'map' {
$ref: map.values($ref);
}
:root {
@include props.materialize($ref, null);
@each $breakpoint in map.keys(media.$breakpoints) {
@include media.media('<=#{$breakpoint}') {
@include props.materialize($ref, $breakpoint);
}
}
@media (prefers-color-scheme: dark) {
@include props.materialize($ref, 'dark');
}
}
@each $theme-name in map.keys(config.$themes) {
@if $theme-name != config.$theme-default {
@include bem.theme(string.slice($theme-name, 3)) {
@include props.materialize($ref, 'color');
@media (prefers-color-scheme: dark) {
@include props.materialize($ref, 'color' 'dark');
}
}
}
}
}
|