diff options
Diffstat (limited to 'src/scopes/_implicit.scss')
-rw-r--r-- | src/scopes/_implicit.scss | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/src/scopes/_implicit.scss b/src/scopes/_implicit.scss new file mode 100644 index 0000000..78f06be --- /dev/null +++ b/src/scopes/_implicit.scss | |||
@@ -0,0 +1,180 @@ | |||
1 | @use 'sass:map'; | ||
2 | @use 'sass:math'; | ||
3 | @use 'sass:meta'; | ||
4 | @use 'sass:string'; | ||
5 | @use 'iro-sass/src/bem'; | ||
6 | @use 'iro-sass/src/props'; | ||
7 | @use '../props' as *; | ||
8 | @use '../core.vars' as core; | ||
9 | |||
10 | @forward 'implicit.vars'; | ||
11 | @use 'implicit.vars' as vars; | ||
12 | |||
13 | @mixin styles { | ||
14 | @include materialize-at-root(meta.module-variables('vars')); | ||
15 | |||
16 | @layer scope { | ||
17 | html { | ||
18 | accent-color: props.get(core.$theme, --accent, --600); | ||
19 | scrollbar-color: props.get(core.$theme, --text-disabled) transparent; | ||
20 | } | ||
21 | |||
22 | body { | ||
23 | padding: 0; | ||
24 | margin: 0; | ||
25 | font-family: props.get(vars.$body--font-family); | ||
26 | font-size: props.get(vars.$body--font-size); | ||
27 | font-feature-settings: props.get(vars.$body--feature-settings); | ||
28 | line-height: props.get(vars.$body--line-height); | ||
29 | color: props.get(core.$theme, --text); | ||
30 | background-color: props.get(core.$theme, --bg-base); | ||
31 | } | ||
32 | |||
33 | pre, | ||
34 | code { | ||
35 | font-family: props.get(vars.$code--font-family); | ||
36 | font-size: props.get(vars.$code--font-size); | ||
37 | font-feature-settings: props.get(vars.$code--feature-settings); | ||
38 | line-height: props.get(vars.$code--line-height); | ||
39 | } | ||
40 | |||
41 | pre { | ||
42 | margin: 0; | ||
43 | overflow-x: auto; | ||
44 | |||
45 | code { | ||
46 | font-size: 1em; | ||
47 | color: currentColor; | ||
48 | } | ||
49 | } | ||
50 | |||
51 | h1, | ||
52 | h2, | ||
53 | h3, | ||
54 | h4, | ||
55 | h5, | ||
56 | h6 { | ||
57 | margin-block: props.get(vars.$heading--margin-bs) 0; | ||
58 | font-family: props.get(vars.$heading--font-family); | ||
59 | font-size: props.get(vars.$heading--font-size); | ||
60 | font-weight: props.get(vars.$heading--font-weight); | ||
61 | font-feature-settings: props.get(vars.$heading--feature-settings); | ||
62 | line-height: props.get(vars.$heading--line-height); | ||
63 | color: props.get(vars.$heading--color); | ||
64 | |||
65 | & + & { | ||
66 | margin-block-start: props.get(vars.$heading--margin-bs-sibling); | ||
67 | } | ||
68 | } | ||
69 | |||
70 | p { | ||
71 | margin-block: props.get(vars.$paragraph--margin-bs) 0; | ||
72 | |||
73 | &:empty { | ||
74 | display: none; | ||
75 | } | ||
76 | } | ||
77 | |||
78 | strong { | ||
79 | font-weight: bold; | ||
80 | } | ||
81 | |||
82 | small { | ||
83 | font-size: props.get(vars.$small--font-size); | ||
84 | } | ||
85 | |||
86 | ul, | ||
87 | ol { | ||
88 | padding: 0; | ||
89 | margin: 0; | ||
90 | list-style: none; | ||
91 | } | ||
92 | |||
93 | li { | ||
94 | padding: 0; | ||
95 | margin: 0; | ||
96 | } | ||
97 | |||
98 | :focus, | ||
99 | :focus-visible { | ||
100 | outline: 0; | ||
101 | } | ||
102 | |||
103 | :link, | ||
104 | :visited { | ||
105 | color: currentColor; | ||
106 | text-decoration: none; | ||
107 | } | ||
108 | |||
109 | |||
110 | button, | ||
111 | input, | ||
112 | textarea { | ||
113 | box-sizing: content-box; | ||
114 | padding: 0; | ||
115 | margin: 0; | ||
116 | font-family: inherit; | ||
117 | font-size: 1em; | ||
118 | font-style: inherit; | ||
119 | font-weight: inherit; | ||
120 | line-height: inherit; | ||
121 | color: currentColor; | ||
122 | text-align: inherit; | ||
123 | text-transform: inherit; | ||
124 | appearance: none; | ||
125 | background: none; | ||
126 | border: 0; | ||
127 | |||
128 | &::-moz-focus-inner { | ||
129 | border: 0; | ||
130 | } | ||
131 | } | ||
132 | |||
133 | input, | ||
134 | textarea { | ||
135 | &::placeholder { | ||
136 | color: props.get(core.$theme, --text-mute); | ||
137 | opacity: 1; | ||
138 | } | ||
139 | |||
140 | &:disabled { | ||
141 | color: props.get(core.$theme, --text-disabled); | ||
142 | } | ||
143 | } | ||
144 | |||
145 | textarea { | ||
146 | block-size: calc(1em * props.get(core.$font--standard--line-height)); | ||
147 | } | ||
148 | |||
149 | hr { | ||
150 | block-size: props.get(core.$border-width--thin); | ||
151 | margin: 0; | ||
152 | background-color: props.get(core.$theme, --border); | ||
153 | border: 0; | ||
154 | } | ||
155 | |||
156 | figure { | ||
157 | padding: 0; | ||
158 | margin: 0; | ||
159 | } | ||
160 | |||
161 | @each $theme in map.keys(props.get(core.$transparent-colors)) { | ||
162 | .t-static-#{string.slice($theme, 3)} { | ||
163 | color: props.get(core.$transparent-colors, $theme, --800); | ||
164 | |||
165 | h1, | ||
166 | h2, | ||
167 | h3, | ||
168 | h4, | ||
169 | h5, | ||
170 | h6 { | ||
171 | color: props.get(core.$transparent-colors, $theme, --900); | ||
172 | } | ||
173 | |||
174 | hr { | ||
175 | color: props.get(core.$transparent-colors, $theme, --400); | ||
176 | } | ||
177 | } | ||
178 | } | ||
179 | } | ||
180 | } | ||