@graupl/graupl 1.0.0-alpha.1 → 1.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/base/form/form.css +1 -77
  3. package/dist/base/form/form.css.map +1 -1
  4. package/dist/base/link/link.css +1 -25
  5. package/dist/base/link/link.css.map +1 -1
  6. package/dist/component/button/button.css +1 -61
  7. package/dist/component/button/button.css.map +1 -1
  8. package/dist/graupl.css +1 -284
  9. package/dist/graupl.css.map +1 -1
  10. package/dist/layout/columns/columns.css +1 -40
  11. package/dist/layout/columns/columns.css.map +1 -1
  12. package/dist/layout/container/container.css +1 -37
  13. package/dist/layout/container/container.css.map +1 -1
  14. package/dist/state/focus/focus.css +1 -9
  15. package/dist/state/focus/focus.css.map +1 -1
  16. package/dist/theme/theme.css +1 -41
  17. package/dist/theme/theme.css.map +1 -1
  18. package/dist/utilities/background/background.css +1 -0
  19. package/dist/utilities/colors/colors.css +2 -0
  20. package/dist/utilities/colors/colors.css.map +1 -0
  21. package/docs/.vitepress/config.js +41 -1
  22. package/docs/.vitepress/theme/custom.scss +29 -29
  23. package/docs/compiling-graupl.md +56 -0
  24. package/docs/introduction.md +5 -0
  25. package/index.html +11 -2
  26. package/package.json +27 -1
  27. package/postcss.config.cjs +1 -1
  28. package/scss/_defaults.scss +3 -0
  29. package/scss/_index.scss +14 -0
  30. package/scss/_init.scss +3 -0
  31. package/scss/base/form/_index.scss +12 -0
  32. package/scss/base/form/_variables.scss +8 -8
  33. package/scss/base/link/_variables.scss +5 -8
  34. package/scss/component/button/_defaults.scss +2 -0
  35. package/scss/component/button/_index.scss +47 -19
  36. package/scss/component/button/_variables.scss +36 -10
  37. package/scss/functions/_important.scss +11 -0
  38. package/scss/functions/_theme.scss +11 -0
  39. package/scss/graupl.scss +1 -5
  40. package/scss/layout/columns/_index.scss +1 -1
  41. package/scss/state/focus/_variables.scss +3 -3
  42. package/scss/theme/_defaults.scss +48 -31
  43. package/scss/theme/_index.scss +13 -28
  44. package/scss/theme/_variables.scss +94 -280
  45. package/scss/utilities/_index.scss +3 -0
  46. package/scss/utilities/colors/_defaults.scss +7 -0
  47. package/scss/utilities/colors/_index.scss +22 -0
  48. package/scss/utilities/colors/_variables.scss +3 -0
  49. package/scss/utilities/colors/colors.scss +3 -0
@@ -1,13 +1,13 @@
1
1
  // Variables referencing custom properties.
2
2
 
3
3
  @use "../../variables" as base;
4
- @use "../../theme/variables" as theme;
5
4
  @use "defaults";
5
+ @use "../../functions/theme";
6
6
 
7
7
  $focus-width: var(--#{defaults.$prefix}-focus-width, #{base.$border-width});
8
8
  $focus-outline-color: var(
9
9
  --#{defaults.$prefix}-focus-outline-color,
10
- #{theme.$theme-active--dark}
10
+ #{theme.get(primary, 900)}
11
11
  );
12
12
  $focus-outline-width: var(
13
13
  --#{defaults.$prefix}-focus-outline-width,
@@ -23,7 +23,7 @@ $focus-outline-offset: var(
23
23
  );
24
24
  $focus-box-shadow-color: var(
25
25
  --#{defaults.$prefix}-focus-box-shadow-color,
26
- #{theme.$theme-active--light}
26
+ #{theme.get(primary, 100)}
27
27
  );
28
28
  $focus-box-shadow-style: var(
29
29
  --#{defaults.$prefix}-focus-box-shadow-style,
@@ -8,38 +8,55 @@
8
8
  @forward "../defaults";
9
9
 
10
10
  // Colours.
11
- $primary: (
12
- 100: hsl(219deg 100% 95%),
13
- 200: hsl(219deg 90% 80%),
14
- 300: hsl(219deg 80% 65%),
15
- 400: hsl(219deg 75% 55%),
16
- 500: hsl(219deg 75% 50%),
17
- 600: hsl(219deg 75% 45%),
18
- 700: hsl(219deg 80% 35%),
19
- 800: hsl(219deg 90% 20%),
20
- 900: hsl(219deg 100% 10%),
11
+ $default-colors: (
12
+ primary: (
13
+ 100: hsl(219deg 100% 95%),
14
+ 200: hsl(219deg 90% 80%),
15
+ 300: hsl(219deg 80% 65%),
16
+ 400: hsl(219deg 75% 55%),
17
+ 500: hsl(219deg 75% 50%),
18
+ 600: hsl(219deg 75% 45%),
19
+ 700: hsl(219deg 80% 35%),
20
+ 800: hsl(219deg 90% 20%),
21
+ 900: hsl(219deg 100% 10%),
22
+ ),
23
+ secondary: (
24
+ 100: hsl(235deg 40% 95%),
25
+ 200: hsl(235deg 30% 80%),
26
+ 300: hsl(235deg 20% 65%),
27
+ 400: hsl(235deg 15% 55%),
28
+ 500: hsl(235deg 15% 50%),
29
+ 600: hsl(235deg 15% 45%),
30
+ 700: hsl(235deg 20% 35%),
31
+ 800: hsl(235deg 30% 20%),
32
+ 900: hsl(235deg 40% 10%),
33
+ ),
34
+ tertiary: (
35
+ 100: hsl(340deg 85% 95%),
36
+ 200: hsl(340deg 75% 80%),
37
+ 300: hsl(340deg 65% 65%),
38
+ 400: hsl(340deg 60% 55%),
39
+ 500: hsl(340deg 60% 50%),
40
+ 600: hsl(340deg 60% 45%),
41
+ 700: hsl(340deg 65% 35%),
42
+ 800: hsl(340deg 75% 20%),
43
+ 900: hsl(340deg 85% 10%),
44
+ ),
21
45
  ) !default;
22
- $secondary: (
23
- 100: hsl(235deg 40% 95%),
24
- 200: hsl(235deg 30% 80%),
25
- 300: hsl(235deg 20% 65%),
26
- 400: hsl(235deg 15% 55%),
27
- 500: hsl(235deg 15% 50%),
28
- 600: hsl(235deg 15% 45%),
29
- 700: hsl(235deg 20% 35%),
30
- 800: hsl(235deg 30% 20%),
31
- 900: hsl(235deg 40% 10%),
32
- ) !default;
33
- $tertiary: (
34
- 100: hsl(340deg 85% 95%),
35
- 200: hsl(340deg 75% 80%),
36
- 300: hsl(340deg 65% 65%),
37
- 400: hsl(340deg 60% 55%),
38
- 500: hsl(340deg 60% 50%),
39
- 600: hsl(340deg 60% 45%),
40
- 700: hsl(340deg 65% 35%),
41
- 800: hsl(340deg 75% 20%),
42
- 900: hsl(340deg 85% 10%),
46
+ $custom-colors: () !default;
47
+ $colors: map.merge($default-colors, $custom-colors) !default;
48
+
49
+ // A map for reversing the shade values of the dark theme.
50
+ $dark-map: (
51
+ 100: 900,
52
+ 200: 800,
53
+ 300: 700,
54
+ 400: 600,
55
+ 500: 500,
56
+ 600: 400,
57
+ 700: 300,
58
+ 800: 200,
59
+ 900: 100,
43
60
  ) !default;
44
61
 
45
62
  // Font properties.
@@ -4,49 +4,34 @@
4
4
  @use "../mixins/layer" as *;
5
5
  @use "defaults";
6
6
  @use "sass:map";
7
+ @use "../functions/theme";
7
8
 
8
9
  @include layer(theme) {
9
10
  :root {
10
- background: $theme-active--light;
11
- color: $theme-active--dark;
11
+ background: theme.get(primary, 100);
12
+ color: theme.get(primary, 900);
12
13
  font-family: $font-family;
13
14
  font-size: $font-size;
14
15
  }
15
16
 
16
17
  // Set the active theme for dark mode.
17
18
  .dark-mode {
18
- --#{defaults.$prefix}-theme-active--primary: #{$theme-dark--primary};
19
- --#{defaults.$prefix}-theme-active--primary--dark: #{$theme-dark--primary--dark};
20
- --#{defaults.$prefix}-theme-active--primary--light: #{$theme-dark--primary--light};
21
- --#{defaults.$prefix}-theme-active--secondary: #{$theme-dark--secondary};
22
- --#{defaults.$prefix}-theme-active--secondary--dark: #{$theme-dark--secondary--dark};
23
- --#{defaults.$prefix}-theme-active--secondary--light: #{$theme-dark--secondary--light};
24
- --#{defaults.$prefix}-theme-active--tertiary: #{$theme-dark--tertiary};
25
- --#{defaults.$prefix}-theme-active--tertiary--dark: #{$theme-dark--tertiary--dark};
26
- --#{defaults.$prefix}-theme-active--tertiary--light: #{$theme-dark--tertiary--light};
27
- --#{defaults.$prefix}-theme-active--light: #{$theme-dark--light};
28
- --#{defaults.$prefix}-theme-active--dark: #{$theme-dark--dark};
29
- --#{defaults.$prefix}-theme-active--shade--light: #{$theme-dark--shade--light};
30
- --#{defaults.$prefix}-theme-active--shade--dark: #{$theme-dark--shade--dark};
19
+ @each $color, $map in $theme-dark {
20
+ @each $shade, $value in $map {
21
+ --#{defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
22
+ }
23
+ }
31
24
 
32
25
  color-scheme: dark;
33
26
  }
34
27
 
35
28
  // Set the active theme for light mode.
36
29
  .light-mode {
37
- --#{defaults.$prefix}-theme-active--primary: #{$theme-light--primary};
38
- --#{defaults.$prefix}-theme-active--primary--dark: #{$theme-light--primary--dark};
39
- --#{defaults.$prefix}-theme-active--primary--light: #{$theme-light--primary--light};
40
- --#{defaults.$prefix}-theme-active--secondary: #{$theme-light--secondary};
41
- --#{defaults.$prefix}-theme-active--secondary--dark: #{$theme-light--secondary--dark};
42
- --#{defaults.$prefix}-theme-active--secondary--light: #{$theme-light--secondary--light};
43
- --#{defaults.$prefix}-theme-active--tertiary: #{$theme-light--tertiary};
44
- --#{defaults.$prefix}-theme-active--tertiary--dark: #{$theme-light--tertiary--dark};
45
- --#{defaults.$prefix}-theme-active--tertiary--light: #{$theme-light--tertiary--light};
46
- --#{defaults.$prefix}-theme-active--light: #{$theme-light--light};
47
- --#{defaults.$prefix}-theme-active--dark: #{$theme-light--dark};
48
- --#{defaults.$prefix}-theme-active--shade--light: #{$theme-light--shade--light};
49
- --#{defaults.$prefix}-theme-active--shade--dark: #{$theme-light--shade--dark};
30
+ @each $color, $map in $theme-light {
31
+ @each $shade, $value in $map {
32
+ --#{defaults.$prefix}-theme-active--#{$color}--#{$shade}: #{$value};
33
+ }
34
+ }
50
35
 
51
36
  color-scheme: light;
52
37
  }
@@ -3,294 +3,108 @@
3
3
  @use "defaults";
4
4
  @use "sass:map";
5
5
 
6
- // Primary theme colours.
7
- $primary: (
8
- 100:
9
- var(--#{defaults.$prefix}-primary--100, #{map.get(defaults.$primary, 100)}),
10
- 200:
11
- var(--#{defaults.$prefix}-primary--200, #{map.get(defaults.$primary, 200)}),
12
- 300:
13
- var(--#{defaults.$prefix}-primary--300, #{map.get(defaults.$primary, 300)}),
14
- 400:
15
- var(--#{defaults.$prefix}-primary--400, #{map.get(defaults.$primary, 400)}),
16
- 500:
17
- var(--#{defaults.$prefix}-primary--500, #{map.get(defaults.$primary, 500)}),
18
- 600:
19
- var(--#{defaults.$prefix}-primary--600, #{map.get(defaults.$primary, 600)}),
20
- 700:
21
- var(--#{defaults.$prefix}-primary--700, #{map.get(defaults.$primary, 700)}),
22
- 800:
23
- var(--#{defaults.$prefix}-primary--800, #{map.get(defaults.$primary, 800)}),
24
- 900:
25
- var(--#{defaults.$prefix}-primary--900, #{map.get(defaults.$primary, 900)}),
26
- );
6
+ // A colour map of base colours and their shades.
7
+ $colors: ();
27
8
 
28
- // Secondary theme colours.
29
- $secondary: (
30
- 100:
31
- var(
32
- --#{defaults.$prefix}-secondary--100,
33
- #{map.get(defaults.$secondary, 100)}
34
- ),
35
- 200:
36
- var(
37
- --#{defaults.$prefix}-secondary--200,
38
- #{map.get(defaults.$secondary, 200)}
39
- ),
40
- 300:
41
- var(
42
- --#{defaults.$prefix}-secondary--300,
43
- #{map.get(defaults.$secondary, 300)}
44
- ),
45
- 400:
46
- var(
47
- --#{defaults.$prefix}-secondary--400,
48
- #{map.get(defaults.$secondary, 400)}
49
- ),
50
- 500:
51
- var(
52
- --#{defaults.$prefix}-secondary--500,
53
- #{map.get(defaults.$secondary, 500)}
54
- ),
55
- 600:
56
- var(
57
- --#{defaults.$prefix}-secondary--600,
58
- #{map.get(defaults.$secondary, 600)}
59
- ),
60
- 700:
61
- var(
62
- --#{defaults.$prefix}-secondary--700,
63
- #{map.get(defaults.$secondary, 700)}
64
- ),
65
- 800:
66
- var(
67
- --#{defaults.$prefix}-secondary--800,
68
- #{map.get(defaults.$secondary, 800)}
69
- ),
70
- 900:
71
- var(
72
- --#{defaults.$prefix}-secondary--900,
73
- #{map.get(defaults.$secondary, 900)}
74
- ),
75
- );
9
+ // Create a map for each colour.
10
+ @each $color, $map in defaults.$colors {
11
+ // A map for the current colour.
12
+ $color-map: ();
76
13
 
77
- // Tertiary theme colours.
78
- $tertiary: (
79
- 100:
80
- var(
81
- --#{defaults.$prefix}-tertiary--100,
82
- #{map.get(defaults.$tertiary, 100)}
83
- ),
84
- 200:
85
- var(
86
- --#{defaults.$prefix}-tertiary--200,
87
- #{map.get(defaults.$tertiary, 200)}
88
- ),
89
- 300:
90
- var(
91
- --#{defaults.$prefix}-tertiary--300,
92
- #{map.get(defaults.$tertiary, 300)}
93
- ),
94
- 400:
95
- var(
96
- --#{defaults.$prefix}-tertiary--400,
97
- #{map.get(defaults.$tertiary, 400)}
98
- ),
99
- 500:
100
- var(
101
- --#{defaults.$prefix}-tertiary--500,
102
- #{map.get(defaults.$tertiary, 500)}
103
- ),
104
- 600:
105
- var(
106
- --#{defaults.$prefix}-tertiary--600,
107
- #{map.get(defaults.$tertiary, 600)}
108
- ),
109
- 700:
110
- var(
111
- --#{defaults.$prefix}-tertiary--700,
112
- #{map.get(defaults.$tertiary, 700)}
113
- ),
114
- 800:
115
- var(
116
- --#{defaults.$prefix}-tertiary--800,
117
- #{map.get(defaults.$tertiary, 800)}
118
- ),
119
- 900:
120
- var(
121
- --#{defaults.$prefix}-tertiary--900,
122
- #{map.get(defaults.$tertiary, 900)}
123
- ),
124
- );
14
+ @each $shade, $value in $map {
15
+ // Set the custom prop name and fallback value.
16
+ $color-property: var(--#{defaults.$prefix}-#{$color}--#{$shade}, $value);
125
17
 
126
- // Theme colours.
127
- // Colour primary.
128
- $theme-light--primary: var(
129
- --#{defaults.$prefix}-theme-light--primary,
130
- #{map.get($primary, 700)}
131
- );
132
- $theme-light--primary--dark: var(
133
- --#{defaults.$prefix}-theme-light--primary--dark,
134
- #{map.get($primary, 800)}
135
- );
136
- $theme-light--primary--light: var(
137
- --#{defaults.$prefix}-theme-light--primary--light,
138
- #{map.get($primary, 600)}
139
- );
140
- $theme-dark--primary: var(
141
- --#{defaults.$prefix}-theme-dark--primary,
142
- #{map.get($primary, 300)}
143
- );
144
- $theme-dark--primary--dark: var(
145
- --#{defaults.$prefix}-theme-dark--primary--dark,
146
- #{map.get($primary, 200)}
147
- );
148
- $theme-dark--primary--light: var(
149
- --#{defaults.$prefix}-theme-dark--primary--light,
150
- #{map.get($primary, 400)}
151
- );
152
- $theme-active--primary: var(
153
- --#{defaults.$prefix}-theme-active--primary,
154
- #{$theme-light--primary}
155
- );
156
- $theme-active--primary--dark: var(
157
- --#{defaults.$prefix}-theme-active--primary--dark,
158
- #{$theme-light--primary--dark}
159
- );
160
- $theme-active--primary--light: var(
161
- --#{defaults.$prefix}-theme-active--primary--light,
162
- #{$theme-light--primary--light}
163
- );
18
+ // Add the custom prop to the map.
19
+ $color-map: map.merge(
20
+ $color-map,
21
+ (
22
+ $shade: $color-property,
23
+ )
24
+ );
25
+ }
164
26
 
165
- // Color secondary.
166
- $theme-light--secondary: var(
167
- --#{defaults.$prefix}-theme-light--secondary,
168
- #{map.get($secondary, 700)}
169
- );
170
- $theme-light--secondary--dark: var(
171
- --#{defaults.$prefix}-theme-light--secondary--dark,
172
- #{map.get($secondary, 800)}
173
- );
174
- $theme-light--secondary--light: var(
175
- --#{defaults.$prefix}-theme-light--secondary--light,
176
- #{map.get($secondary, 600)}
177
- );
178
- $theme-dark--secondary: var(
179
- --#{defaults.$prefix}-theme-dark--secondary,
180
- #{map.get($secondary, 300)}
181
- );
182
- $theme-dark--secondary--dark: var(
183
- --#{defaults.$prefix}-theme-dark--secondary--dark,
184
- #{map.get($secondary, 200)}
185
- );
186
- $theme-dark--secondary--light: var(
187
- --#{defaults.$prefix}-theme-dark--secondary--light,
188
- #{map.get($secondary, 400)}
189
- );
190
- $theme-active--secondary: var(
191
- --#{defaults.$prefix}-theme-active--secondary,
192
- #{$theme-light--secondary}
193
- );
194
- $theme-active--secondary--dark: var(
195
- --#{defaults.$prefix}-theme-active--secondary--dark,
196
- #{$theme-light--secondary--dark}
197
- );
198
- $theme-active--secondary--light: var(
199
- --#{defaults.$prefix}-theme-active--secondary--light,
200
- #{$theme-light--secondary--light}
201
- );
27
+ // Merge the colour map with the existing colours.
28
+ $colors: map.merge(
29
+ $colors,
30
+ (
31
+ $color: $color-map,
32
+ )
33
+ );
34
+ }
202
35
 
203
- // Colour tertiary.
204
- $theme-light--tertiary: var(
205
- --#{defaults.$prefix}-theme-light--tertiary,
206
- #{map.get($tertiary, 700)}
207
- );
208
- $theme-light--tertiary--dark: var(
209
- --#{defaults.$prefix}-theme-light--tertiary--dark,
210
- #{map.get($tertiary, 800)}
211
- );
212
- $theme-light--tertiary--light: var(
213
- --#{defaults.$prefix}-theme-light--tertiary--light,
214
- #{map.get($tertiary, 600)}
215
- );
216
- $theme-dark--tertiary: var(
217
- --#{defaults.$prefix}-theme-dark--tertiary,
218
- #{map.get($tertiary, 300)}
219
- );
220
- $theme-dark--tertiary--dark: var(
221
- --#{defaults.$prefix}-theme-dark--tertiary--dark,
222
- #{map.get($tertiary, 200)}
223
- );
224
- $theme-dark--tertiary--light: var(
225
- --#{defaults.$prefix}-theme-dark--tertiary--light,
226
- #{map.get($tertiary, 400)}
227
- );
228
- $theme-active--tertiary: var(
229
- --#{defaults.$prefix}-theme-active--tertiary,
230
- #{$theme-light--tertiary}
231
- );
232
- $theme-active--tertiary--dark: var(
233
- --#{defaults.$prefix}-theme-active--tertiary--dark,
234
- #{$theme-light--tertiary--dark}
235
- );
236
- $theme-active--tertiary--light: var(
237
- --#{defaults.$prefix}-theme-active--tertiary--light,
238
- #{$theme-light--tertiary--light}
239
- );
36
+ // Theme properties.
37
+ $theme-light: ();
38
+ $theme-dark: ();
39
+ $theme-active: ();
240
40
 
241
- // Colour light.
242
- $theme-light--light: var(
243
- --#{defaults.$prefix}-theme-light--light,
244
- #{map.get($primary, 100)}
245
- );
246
- $theme-dark--light: var(
247
- --#{defaults.$prefix}-theme-dark--light,
248
- #{map.get($primary, 900)}
249
- );
250
- $theme-active--light: var(
251
- --#{defaults.$prefix}-theme-active--light,
252
- #{$theme-light--light}
253
- );
41
+ // Create a map for each colour theme.
42
+ @each $color, $map in $colors {
43
+ // Maps for the current colour theme variants.
44
+ $light-map: ();
45
+ $dark-map: ();
46
+ $active-map: ();
254
47
 
255
- // Colour dark.
256
- $theme-light--dark: var(
257
- --#{defaults.$prefix}-theme-light--dark,
258
- #{map.get($primary, 900)}
259
- );
260
- $theme-dark--dark: var(
261
- --#{defaults.$prefix}-theme-dark--dark,
262
- #{map.get($primary, 100)}
263
- );
264
- $theme-active--dark: var(
265
- --#{defaults.$prefix}-theme-active--dark,
266
- #{$theme-light--dark}
267
- );
48
+ @each $shade, $value in $map {
49
+ // Get the dark shade and value.
50
+ $dark-shade: map.get(defaults.$dark-map, $shade);
51
+ $dark-value: map.get($map, $dark-shade);
268
52
 
269
- // Colour shade.
270
- $theme-light--shade--light: var(
271
- --#{defaults.$prefix}-theme-light--shade--light,
272
- #{map.get($primary, 200)}
273
- );
274
- $theme-light--shade--dark: var(
275
- --#{defaults.$prefix}-theme-light--shade--dark,
276
- #{map.get($primary, 300)}
277
- );
278
- $theme-dark--shade--light: var(
279
- --#{defaults.$prefix}-theme-dark--shade--light,
280
- #{map.get($primary, 800)}
281
- );
282
- $theme-dark--shade--dark: var(
283
- --#{defaults.$prefix}-theme-dark--shade--dark,
284
- #{map.get($primary, 700)}
285
- );
286
- $theme-active--shade--light: var(
287
- --#{defaults.$prefix}-theme-active--shade--light,
288
- #{$theme-light--shade--light}
289
- );
290
- $theme-active--shade--dark: var(
291
- --#{defaults.$prefix}-theme-active--shade--dark,
292
- #{$theme-light--shade--dark}
293
- );
53
+ // Set the custom prop names and fallback values.
54
+ $light-property: var(
55
+ --#{defaults.$prefix}-theme-light--#{$color}--#{$shade},
56
+ $value
57
+ );
58
+ $dark-property: var(
59
+ --#{defaults.$prefix}-theme-dark--#{$color}--#{$shade},
60
+ $dark-value
61
+ );
62
+ $active-property: var(
63
+ --#{defaults.$prefix}-theme-active--#{$color}--#{$shade},
64
+ $light-property
65
+ );
66
+
67
+ // Add the custom props to the maps.
68
+ $light-map: map.merge(
69
+ $light-map,
70
+ (
71
+ $shade: $light-property,
72
+ )
73
+ );
74
+ $dark-map: map.merge(
75
+ $dark-map,
76
+ (
77
+ $shade: $dark-property,
78
+ )
79
+ );
80
+ $active-map: map.merge(
81
+ $active-map,
82
+ (
83
+ $shade: $active-property,
84
+ )
85
+ );
86
+ }
87
+
88
+ // Merge the theme maps with the existing themes.
89
+ $theme-light: map.merge(
90
+ $theme-light,
91
+ (
92
+ $color: $light-map,
93
+ )
94
+ );
95
+ $theme-dark: map.merge(
96
+ $theme-dark,
97
+ (
98
+ $color: $dark-map,
99
+ )
100
+ );
101
+ $theme-active: map.merge(
102
+ $theme-active,
103
+ (
104
+ $color: $active-map,
105
+ )
106
+ );
107
+ }
294
108
 
295
109
  // Font properties.
296
110
  $font-family: var(--#{defaults.$prefix}-font-family, #{defaults.$font-family});
@@ -0,0 +1,3 @@
1
+ // Graupl utilities.
2
+
3
+ @forward "colors";
@@ -0,0 +1,7 @@
1
+ // Default values for Graupl.
2
+ //
3
+ // Generally, these should not be used directly when styling components.
4
+ // They are mainly used to provide default fallbacks for custom properties
5
+ // which can be found in the `variables.scss` file.
6
+
7
+ @forward "../../defaults";
@@ -0,0 +1,22 @@
1
+ // Graupl color utilities.
2
+
3
+ @use "variables" as *;
4
+ @use "../../mixins/layer" as *;
5
+ @use "../../functions/important";
6
+ @use "../../theme/variables" as theme;
7
+
8
+ @include layer(utilities) {
9
+ @each $color, $map in theme.$theme-active {
10
+ @each $shade, $value in $map {
11
+ $name: #{$color}-#{$shade};
12
+
13
+ .background-#{$name} {
14
+ background: important.insert($value);
15
+ }
16
+
17
+ .color-#{$name} {
18
+ color: important.insert($value);
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,3 @@
1
+ // Variables referencing custom properties.
2
+
3
+ @forward "defaults";
@@ -0,0 +1,3 @@
1
+ // Graupl color utilities.
2
+
3
+ @forward "index";