@graupl/core 1.0.0-beta.15 → 1.0.0-beta.17
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.
- package/dist/css/base/button.css +1 -1
- package/dist/css/base/button.css.map +1 -1
- package/dist/css/base/form.css +1 -1
- package/dist/css/base/form.css.map +1 -1
- package/dist/css/base/link.css +1 -1
- package/dist/css/base/link.css.map +1 -1
- package/dist/css/base/table.css.map +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/base.css.map +1 -1
- package/dist/css/component/accordion.css +2 -2
- package/dist/css/component/accordion.css.map +1 -1
- package/dist/css/component/alert.css +1 -1
- package/dist/css/component/alert.css.map +1 -1
- package/dist/css/component/carousel.css +1 -1
- package/dist/css/component/carousel.css.map +1 -1
- package/dist/css/component.css +2 -2
- package/dist/css/component.css.map +1 -1
- package/dist/css/graupl.css +2 -2
- package/dist/css/graupl.css.map +1 -1
- package/dist/css/layout.css +2 -2
- package/dist/css/layout.css.map +1 -1
- package/dist/css/state/focus.css +1 -1
- package/dist/css/state/focus.css.map +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/state.css.map +1 -1
- package/dist/css/theme/color.css +1 -1
- package/dist/css/theme/color.css.map +1 -1
- package/dist/css/theme.css +1 -1
- package/dist/css/theme.css.map +1 -1
- package/dist/css/utilities/border.css +1 -1
- package/dist/css/utilities/border.css.map +1 -1
- package/dist/css/utilities/color.css +1 -1
- package/dist/css/utilities/color.css.map +1 -1
- package/dist/css/utilities/gradient.css +1 -1
- package/dist/css/utilities/gradient.css.map +1 -1
- package/dist/css/utilities/order.css.map +1 -1
- package/dist/css/utilities/typography.css +1 -1
- package/dist/css/utilities/typography.css.map +1 -1
- package/dist/css/utilities/visually-hidden.css.map +1 -1
- package/dist/css/utilities.css +1 -1
- package/dist/css/utilities.css.map +1 -1
- package/dist/js/accordion.js.map +1 -1
- package/dist/js/alert.js.map +1 -1
- package/dist/js/carousel.js.map +1 -1
- package/dist/js/component/accordion.cjs.js.map +1 -1
- package/dist/js/component/accordion.es.js.map +1 -1
- package/dist/js/component/accordion.iife.js.map +1 -1
- package/dist/js/component/alert.cjs.js.map +1 -1
- package/dist/js/component/alert.es.js.map +1 -1
- package/dist/js/component/alert.iife.js.map +1 -1
- package/dist/js/component/carousel.cjs.js.map +1 -1
- package/dist/js/component/carousel.es.js.map +1 -1
- package/dist/js/component/carousel.iife.js.map +1 -1
- package/dist/js/generator/accordion.cjs.js.map +1 -1
- package/dist/js/generator/accordion.es.js.map +1 -1
- package/dist/js/generator/accordion.iife.js.map +1 -1
- package/dist/js/generator/alert.cjs.js.map +1 -1
- package/dist/js/generator/alert.es.js.map +1 -1
- package/dist/js/generator/alert.iife.js.map +1 -1
- package/dist/js/generator/carousel.cjs.js.map +1 -1
- package/dist/js/generator/carousel.es.js.map +1 -1
- package/dist/js/generator/carousel.iife.js.map +1 -1
- package/dist/js/generator/navigation.cjs.js.map +1 -1
- package/dist/js/generator/navigation.es.js.map +1 -1
- package/dist/js/generator/navigation.iife.js.map +1 -1
- package/dist/js/graupl.js.map +1 -1
- package/dist/js/navigation.js.map +1 -1
- package/package.json +1 -1
- package/src/scss/_defaults.scss +147 -29
- package/src/scss/base/button/_defaults.scss +21 -5
- package/src/scss/base/button/_mixins.scss +1 -1
- package/src/scss/base/table/_defaults.scss +15 -2
- package/src/scss/base/table/_index.scss +4 -7
- package/src/scss/component/alert/_defaults.scss +22 -5
- package/src/scss/component/alert/_index.scss +1 -1
- package/src/scss/functions/_theme.scss +14 -2
- package/src/scss/theme/color/_defaults.scss +84 -14
- package/src/scss/theme/color/_index.scss +18 -3
- package/src/scss/theme/color/_variables.scss +63 -30
- package/src/scss/theme/typography/_defaults.scss +37 -7
- package/src/scss/utilities/_template/_defaults.scss +7 -6
- package/src/scss/utilities/_template/_index.scss +2 -2
- package/src/scss/utilities/alignment/_defaults.scss +53 -15
- package/src/scss/utilities/alignment/_index.scss +4 -6
- package/src/scss/utilities/background/_defaults.scss +117 -35
- package/src/scss/utilities/background/_index.scss +8 -14
- package/src/scss/utilities/border/_defaults.scss +77 -15
- package/src/scss/utilities/border/_index.scss +73 -75
- package/src/scss/utilities/color/_defaults.scss +55 -7
- package/src/scss/utilities/color/_index.scss +143 -144
- package/src/scss/utilities/container/_defaults.scss +21 -5
- package/src/scss/utilities/container/_index.scss +2 -2
- package/src/scss/utilities/display/_defaults.scss +18 -5
- package/src/scss/utilities/display/_index.scss +2 -2
- package/src/scss/utilities/flex/_defaults.scss +88 -25
- package/src/scss/utilities/flex/_index.scss +6 -10
- package/src/scss/utilities/gradient/_defaults.scss +64 -9
- package/src/scss/utilities/gradient/_index.scss +127 -129
- package/src/scss/utilities/height/_defaults.scss +27 -2
- package/src/scss/utilities/height/_index.scss +169 -163
- package/src/scss/utilities/inset/_defaults.scss +25 -4
- package/src/scss/utilities/inset/_index.scss +3 -4
- package/src/scss/utilities/justification/_defaults.scss +53 -15
- package/src/scss/utilities/justification/_index.scss +4 -6
- package/src/scss/utilities/list/_defaults.scss +37 -10
- package/src/scss/utilities/list/_index.scss +3 -4
- package/src/scss/utilities/order/_defaults.scss +33 -2
- package/src/scss/utilities/order/_index.scss +55 -67
- package/src/scss/utilities/position/_defaults.scss +18 -5
- package/src/scss/utilities/position/_index.scss +2 -2
- package/src/scss/utilities/ratio/_defaults.scss +15 -2
- package/src/scss/utilities/ratio/_index.scss +2 -2
- package/src/scss/utilities/spacing/_defaults.scss +18 -5
- package/src/scss/utilities/spacing/_index.scss +2 -2
- package/src/scss/utilities/typography/_defaults.scss +146 -12
- package/src/scss/utilities/typography/_index.scss +854 -704
- package/src/scss/utilities/visibility/_defaults.scss +20 -5
- package/src/scss/utilities/visibility/_index.scss +2 -2
- package/src/scss/utilities/visually-hidden/_defaults.scss +1 -0
- package/src/scss/utilities/visually-hidden/_index.scss +1 -0
- package/src/scss/utilities/width/_defaults.scss +27 -2
- package/src/scss/utilities/width/_index.scss +163 -163
- package/src/scss/utilities/z-index/_defaults.scss +17 -5
- package/src/scss/utilities/z-index/_index.scss +2 -2
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
// Those should be defined as custom properties in the `_variables.scss` file.
|
|
8
8
|
|
|
9
9
|
@use "../../defaults" as root-defaults;
|
|
10
|
+
@use "../../functions/theme";
|
|
11
|
+
@use "../../theme/color/variables" as color;
|
|
10
12
|
@use "sass:map";
|
|
11
13
|
|
|
12
14
|
// Utility modifiers.
|
|
13
15
|
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
16
|
$use-important: root-defaults.$use-important !default;
|
|
17
|
+
$generate-base-utilities: root-defaults.$generate-base-utilities !default;
|
|
15
18
|
$screen-aware: false !default;
|
|
16
19
|
$theme-aware: true !default;
|
|
17
20
|
$state-aware: true !default;
|
|
@@ -27,23 +30,68 @@ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selecto
|
|
|
27
30
|
|
|
28
31
|
// Background utility properties.
|
|
29
32
|
$background-selector-prefix: "bg-" !default;
|
|
30
|
-
|
|
33
|
+
$-background-properties: (
|
|
31
34
|
inherit: inherit,
|
|
32
35
|
current: currentcolor,
|
|
33
36
|
transparent: transparent,
|
|
34
37
|
);
|
|
35
38
|
$custom-background-properties: () !default;
|
|
36
|
-
$background-properties:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
)
|
|
39
|
+
$background-properties: () !default;
|
|
40
|
+
|
|
41
|
+
// @todo remove this once $custom-background-properties is removed
|
|
42
|
+
@if $custom-background-properties != () {
|
|
43
|
+
@warn "`$custom-background-properties` is deprecated and will be removed in a future release of Graupl. Use `$background-properties` instead.";
|
|
44
|
+
|
|
45
|
+
$background-properties: map.merge(
|
|
46
|
+
$background-properties,
|
|
47
|
+
$custom-background-properties
|
|
48
|
+
);
|
|
49
|
+
}
|
|
40
50
|
|
|
41
51
|
// Text utility properties.
|
|
42
52
|
$text-selector-prefix: "text-" !default;
|
|
43
|
-
|
|
53
|
+
$-text-properties: (
|
|
44
54
|
inherit: inherit,
|
|
45
55
|
current: currentcolor,
|
|
46
56
|
transparent: transparent,
|
|
47
57
|
);
|
|
48
58
|
$custom-text-properties: () !default;
|
|
49
|
-
$text-properties:
|
|
59
|
+
$text-properties: () !default;
|
|
60
|
+
|
|
61
|
+
// @todo remove this once $custom-text-properties is removed
|
|
62
|
+
@if $custom-text-properties != () {
|
|
63
|
+
@warn "`$custom-text-properties` is deprecated and will be removed in a future release of Graupl. Use `$text-properties` instead.";
|
|
64
|
+
|
|
65
|
+
$text-properties: map.merge($text-properties, $custom-text-properties);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Add all of the active theme colours to the text and background base properties.
|
|
69
|
+
@each $color in theme.get-colors() {
|
|
70
|
+
$map: theme.get-color($color);
|
|
71
|
+
|
|
72
|
+
@each $shade, $value in $map {
|
|
73
|
+
// Handle _default shade vs proper shade mappings.
|
|
74
|
+
$name: null;
|
|
75
|
+
|
|
76
|
+
@if $shade == "_default" {
|
|
77
|
+
$name: #{$color};
|
|
78
|
+
} @else {
|
|
79
|
+
$name: #{$color}-#{$shade};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
$-background-properties: map.merge(
|
|
83
|
+
$-background-properties,
|
|
84
|
+
(#{$name}: #{$value})
|
|
85
|
+
);
|
|
86
|
+
$-text-properties: map.merge($-text-properties, (#{$name}: #{$value}));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Merge custom properties with base properties if generating base utilities.
|
|
91
|
+
@if $generate-base-utilities {
|
|
92
|
+
$background-properties: map.merge(
|
|
93
|
+
$-background-properties,
|
|
94
|
+
$background-properties
|
|
95
|
+
);
|
|
96
|
+
$text-properties: map.merge($-text-properties, $text-properties);
|
|
97
|
+
}
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
// The following variables control the generated classes:
|
|
71
71
|
// - `$selector-base`: The base selector for the utility classes.
|
|
72
72
|
// - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
|
|
73
|
+
// - `$generate-base-utilities`: A flag to determine if the base utility classes should be generated.
|
|
73
74
|
// - `$screen-aware`: A flag to generate screen-aware utility classes.
|
|
74
75
|
// - `$theme-aware`: A flag to generate theme-aware utility classes.
|
|
75
76
|
// - `$state-aware`: A flag to generate state-aware utility classes.
|
|
@@ -83,12 +84,10 @@
|
|
|
83
84
|
// - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
|
|
84
85
|
// - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
|
|
85
86
|
// - `$background-selector-prefix`: The prefix for the background utility classes.
|
|
86
|
-
// - `$
|
|
87
|
-
// - `$custom-background-properties`: The custom properties and values for the background utility classes.
|
|
87
|
+
// - `$custom-background-properties`: [DEPRECATED] The custom properties and values for the background utility classes.
|
|
88
88
|
// - `$background-properties`: The merged properties and values for the background utility classes.
|
|
89
89
|
// - `$text-selector-prefix`: The prefix for the text utility classes.
|
|
90
|
-
// - `$
|
|
91
|
-
// - `$custom-text-properties`: The custom properties and values for text utility classes.
|
|
90
|
+
// - `$custom-text-properties`: [DEPRECATED] The custom properties and values for text utility classes.
|
|
92
91
|
// - `$text-properties`: The merged properties and values for text utility classes.
|
|
93
92
|
//
|
|
94
93
|
// Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
|
|
@@ -138,30 +137,30 @@
|
|
|
138
137
|
$selector-prefix: defaults.$selector-base;
|
|
139
138
|
|
|
140
139
|
// For each theme colour, create a utility class for background and color.
|
|
141
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
140
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
141
|
+
// @each $shade, $value in $map {
|
|
142
|
+
// // e.g. `.bg-primary-500` or `.bg-secondary-700`
|
|
143
|
+
// $selector: #{$selector-prefix}#{defaults.$background-selector-prefix}#{$color}-#{$shade};
|
|
144
|
+
|
|
145
|
+
// @include utility.create-mapped(
|
|
146
|
+
// $selector,
|
|
147
|
+
// (
|
|
148
|
+
// --#{root-defaults.$prefix}background: #{$value},
|
|
149
|
+
// background: #{color.$background}
|
|
150
|
+
// ),
|
|
151
|
+
// $important: defaults.$use-important
|
|
152
|
+
// );
|
|
153
|
+
|
|
154
|
+
// // e.g. `.text-primary-500` or `.text-secondary-700`
|
|
155
|
+
// $selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$color}-#{$shade};
|
|
156
|
+
|
|
157
|
+
// @include utility.create-mapped(
|
|
158
|
+
// $selector,
|
|
159
|
+
// (--#{root-defaults.$prefix}color: #{$value}, color: #{color.$color}),
|
|
160
|
+
// $important: defaults.$use-important
|
|
161
|
+
// );
|
|
162
|
+
// }
|
|
163
|
+
// }
|
|
165
164
|
|
|
166
165
|
// For each background property, create a utility class.
|
|
167
166
|
@each $name, $value in defaults.$background-properties {
|
|
@@ -197,35 +196,35 @@
|
|
|
197
196
|
$selector-prefix: #{defaults.$selector-base}#{defaults.$screen-aware-selector-prefix}#{$screen-name}#{defaults.$screen-aware-separator};
|
|
198
197
|
|
|
199
198
|
// For each theme colour, create a utility class for background and color.
|
|
200
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
199
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
200
|
+
// @each $shade, $value in $map {
|
|
201
|
+
// // e.g. `.md:bg-primary-500` or `.lg:bg-secondary-700`
|
|
202
|
+
// $selector: #{$selector-prefix}#{defaults.$background-selector-prefix}#{$color}-#{$shade};
|
|
203
|
+
|
|
204
|
+
// @include utility.create-mapped(
|
|
205
|
+
// $selector,
|
|
206
|
+
// (
|
|
207
|
+
// --#{root-defaults.$prefix}background: #{$value},
|
|
208
|
+
// background: #{color.$background}
|
|
209
|
+
// ),
|
|
210
|
+
// $important: defaults.$use-important,
|
|
211
|
+
// $screen: $screen-name
|
|
212
|
+
// );
|
|
213
|
+
|
|
214
|
+
// // e.g. `.md:text-primary-500` or `.lg:text-secondary-700`
|
|
215
|
+
// $selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$color}-#{$shade};
|
|
216
|
+
|
|
217
|
+
// @include utility.create-mapped(
|
|
218
|
+
// $selector,
|
|
219
|
+
// (
|
|
220
|
+
// --#{root-defaults.$prefix}color: #{$value},
|
|
221
|
+
// color: #{color.$color}
|
|
222
|
+
// ),
|
|
223
|
+
// $important: defaults.$use-important,
|
|
224
|
+
// $screen: $screen-name
|
|
225
|
+
// );
|
|
226
|
+
// }
|
|
227
|
+
// }
|
|
229
228
|
|
|
230
229
|
// For each background property, create a utility class.
|
|
231
230
|
@each $name, $value in defaults.$background-properties {
|
|
@@ -266,35 +265,35 @@
|
|
|
266
265
|
$selector-prefix: #{defaults.$selector-base}#{defaults.$theme-aware-selector-prefix}#{$theme-name}#{defaults.$theme-aware-separator};
|
|
267
266
|
|
|
268
267
|
// For each theme colour, create a utility class for background and color.
|
|
269
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
268
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
269
|
+
// @each $shade, $value in $map {
|
|
270
|
+
// // e.g. `.dark:bg-primary-500` or `.light:bg-secondary-700`
|
|
271
|
+
// $selector: #{$selector-prefix}#{defaults.$background-selector-prefix}#{$color}-#{$shade};
|
|
272
|
+
|
|
273
|
+
// @include utility.create-mapped(
|
|
274
|
+
// $selector,
|
|
275
|
+
// (
|
|
276
|
+
// --#{root-defaults.$prefix}background: #{$value},
|
|
277
|
+
// background: #{color.$background}
|
|
278
|
+
// ),
|
|
279
|
+
// $important: defaults.$use-important,
|
|
280
|
+
// $theme: $theme-name
|
|
281
|
+
// );
|
|
282
|
+
|
|
283
|
+
// // e.g. `.dark:text-primary-500` or `.light:text-secondary-700`
|
|
284
|
+
// $selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$color}-#{$shade};
|
|
285
|
+
|
|
286
|
+
// @include utility.create-mapped(
|
|
287
|
+
// $selector,
|
|
288
|
+
// (
|
|
289
|
+
// --#{root-defaults.$prefix}color: #{$value},
|
|
290
|
+
// color: #{color.$color}
|
|
291
|
+
// ),
|
|
292
|
+
// $important: defaults.$use-important,
|
|
293
|
+
// $theme: $theme-name
|
|
294
|
+
// );
|
|
295
|
+
// }
|
|
296
|
+
// }
|
|
298
297
|
|
|
299
298
|
// For each background property, create a utility class.
|
|
300
299
|
@each $name, $value in defaults.$background-properties {
|
|
@@ -338,35 +337,35 @@
|
|
|
338
337
|
$selector-prefix: #{defaults.$selector-base}#{defaults.$state-aware-selector-prefix}#{$state-name}#{defaults.$state-aware-separator};
|
|
339
338
|
|
|
340
339
|
// For each theme colour, create a utility class for background and color.
|
|
341
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}
|
|
340
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
341
|
+
// @each $shade, $value in $map {
|
|
342
|
+
// // e.g. `.hover:bg-primary-500` or `.focus:bg-secondary-700`
|
|
343
|
+
// $selector: #{$selector-prefix}#{defaults.$background-selector-prefix}#{$color}-#{$shade};
|
|
344
|
+
|
|
345
|
+
// @include utility.create-mapped(
|
|
346
|
+
// $selector,
|
|
347
|
+
// (
|
|
348
|
+
// --#{root-defaults.$prefix}background: #{$value},
|
|
349
|
+
// background: #{color.$background}
|
|
350
|
+
// ),
|
|
351
|
+
// $important: defaults.$use-important,
|
|
352
|
+
// $state: $state-name
|
|
353
|
+
// );
|
|
354
|
+
|
|
355
|
+
// // e.g. `.hover:text-primary-500` or `.focus:text-secondary-700`
|
|
356
|
+
// $selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$color}-#{$shade};
|
|
357
|
+
|
|
358
|
+
// @include utility.create-mapped(
|
|
359
|
+
// $selector,
|
|
360
|
+
// (
|
|
361
|
+
// --#{root-defaults.$prefix}color: #{$value},
|
|
362
|
+
// color: #{color.$color}
|
|
363
|
+
// ),
|
|
364
|
+
// $important: defaults.$use-important,
|
|
365
|
+
// $state: $state-name
|
|
366
|
+
// );
|
|
367
|
+
// }
|
|
368
|
+
// }
|
|
370
369
|
|
|
371
370
|
// For each background property, create a utility class.
|
|
372
371
|
@each $name, $value in defaults.$background-properties {
|
|
@@ -406,35 +405,35 @@
|
|
|
406
405
|
$selector-prefix: #{defaults.$selector-base}#{defaults.$container-aware-selector-prefix}#{$container-name}#{defaults.$container-aware-separator};
|
|
407
406
|
|
|
408
407
|
// For each theme colour, create a utility class for background and color.
|
|
409
|
-
@each $color, $map in map.get(color.$themes, active) {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}
|
|
408
|
+
// @each $color, $map in map.get(color.$themes, active) {
|
|
409
|
+
// @each $shade, $value in $map {
|
|
410
|
+
// // e.g. `.md:bg-primary-500` or `.lg:bg-secondary-700`
|
|
411
|
+
// $selector: #{$selector-prefix}#{defaults.$background-selector-prefix}#{$color}-#{$shade};
|
|
412
|
+
|
|
413
|
+
// @include utility.create-mapped(
|
|
414
|
+
// $selector,
|
|
415
|
+
// (
|
|
416
|
+
// --#{root-defaults.$prefix}background: #{$value},
|
|
417
|
+
// background: #{color.$background}
|
|
418
|
+
// ),
|
|
419
|
+
// $important: defaults.$use-important,
|
|
420
|
+
// $container: $container-name
|
|
421
|
+
// );
|
|
422
|
+
|
|
423
|
+
// // e.g. `.md:text-primary-500` or `.lg:text-secondary-700`
|
|
424
|
+
// $selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$color}-#{$shade};
|
|
425
|
+
|
|
426
|
+
// @include utility.create-mapped(
|
|
427
|
+
// $selector,
|
|
428
|
+
// (
|
|
429
|
+
// --#{root-defaults.$prefix}color: #{$value},
|
|
430
|
+
// color: #{color.$color}
|
|
431
|
+
// ),
|
|
432
|
+
// $important: defaults.$use-important,
|
|
433
|
+
// $container: $container-name
|
|
434
|
+
// );
|
|
435
|
+
// }
|
|
436
|
+
// }
|
|
438
437
|
|
|
439
438
|
// For each background property, create a utility class.
|
|
440
439
|
@each $name, $value in defaults.$background-properties {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
// Utility modifiers.
|
|
13
13
|
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
14
|
$use-important: root-defaults.$use-important !default;
|
|
15
|
+
$generate-base-utilities: root-defaults.$generate-base-utilities !default;
|
|
15
16
|
$screen-aware: false !default;
|
|
16
17
|
$theme-aware: false !default;
|
|
17
18
|
$state-aware: false !default;
|
|
@@ -27,14 +28,29 @@ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selecto
|
|
|
27
28
|
|
|
28
29
|
// Container type properties.
|
|
29
30
|
$container-type-selector-prefix: "container-type-" !default;
|
|
30
|
-
|
|
31
|
+
$-container-type-properties: (
|
|
31
32
|
inline: "inline-size",
|
|
32
33
|
normal: "normal",
|
|
33
34
|
size: "size",
|
|
34
35
|
scroll: "scroll-state",
|
|
35
36
|
);
|
|
36
37
|
$custom-container-type-properties: () !default;
|
|
37
|
-
$container-type-properties:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
38
|
+
$container-type-properties: () !default;
|
|
39
|
+
|
|
40
|
+
// @todo remove this once $custom-container-type-properties is removed
|
|
41
|
+
@if $custom-container-type-properties != () {
|
|
42
|
+
@warn "`$custom-container-type-properties` is deprecated and will be removed in a future release of Graupl. Use `$container-type-properties` instead.";
|
|
43
|
+
|
|
44
|
+
$container-type-properties: map.merge(
|
|
45
|
+
$container-type-properties,
|
|
46
|
+
$custom-container-type-properties
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Merge custom properties with base properties if generating base utilities.
|
|
51
|
+
@if $generate-base-utilities {
|
|
52
|
+
$container-type-properties: map.merge(
|
|
53
|
+
$-container-type-properties,
|
|
54
|
+
$container-type-properties
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
// The following variables control the generated classes:
|
|
15
15
|
// - `$selector-base`: The base selector for the utility classes.
|
|
16
16
|
// - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
|
|
17
|
+
// - `$generate-base-utilities`: A flag to determine if the base utility classes should be generated.
|
|
17
18
|
// - `$screen-aware`: A flag to generate screen-aware utility classes.
|
|
18
19
|
// - `$theme-aware`: A flag to generate theme-aware utility classes.
|
|
19
20
|
// - `$state-aware`: A flag to generate state-aware utility classes.
|
|
@@ -27,8 +28,7 @@
|
|
|
27
28
|
// - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
|
|
28
29
|
// - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
|
|
29
30
|
// - `$container-type-selector-prefix`: The prefix for the utility classes.
|
|
30
|
-
// - `$
|
|
31
|
-
// - `$custom-container-type-properties`: The custom properties and values for the container-type utility classes.
|
|
31
|
+
// - `$custom-container-type-properties`: [DEPRECATED] The custom properties and values for the container-type utility classes.
|
|
32
32
|
// - `$container-type-properties`: The merged properties and values for the container-type utility classes.
|
|
33
33
|
//
|
|
34
34
|
// Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
// Utility modifiers.
|
|
13
13
|
$selector-base: root-defaults.$utility-selector-base !default;
|
|
14
14
|
$use-important: root-defaults.$use-important !default;
|
|
15
|
+
$generate-base-utilities: root-defaults.$generate-base-utilities !default;
|
|
15
16
|
$screen-aware: true !default;
|
|
16
17
|
$theme-aware: false !default;
|
|
17
18
|
$state-aware: false !default;
|
|
@@ -27,7 +28,7 @@ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selecto
|
|
|
27
28
|
|
|
28
29
|
// Display properties.
|
|
29
30
|
$display-selector-prefix: "display-" !default;
|
|
30
|
-
|
|
31
|
+
$-display-properties: (
|
|
31
32
|
block: block,
|
|
32
33
|
inline-block: inline-block,
|
|
33
34
|
inline: inline,
|
|
@@ -41,7 +42,19 @@ $base-display-properties: (
|
|
|
41
42
|
list-item: list-item,
|
|
42
43
|
);
|
|
43
44
|
$custom-display-properties: () !default;
|
|
44
|
-
$display-properties:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
45
|
+
$display-properties: () !default;
|
|
46
|
+
|
|
47
|
+
// @todo remove this once $custom-display-properties is removed
|
|
48
|
+
@if $custom-display-properties != () {
|
|
49
|
+
@warn "`$custom-display-properties` is deprecated and will be removed in a future release of Graupl. Use `$display-properties` instead.";
|
|
50
|
+
|
|
51
|
+
$display-properties: map.merge(
|
|
52
|
+
$display-properties,
|
|
53
|
+
$custom-display-properties
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Merge custom properties with base properties if generating base utilities.
|
|
58
|
+
@if $generate-base-utilities {
|
|
59
|
+
$display-properties: map.merge($-display-properties, $display-properties);
|
|
60
|
+
}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
// The following variables control the generated classes:
|
|
22
22
|
// - `$selector-base`: The base selector for the utility classes.
|
|
23
23
|
// - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
|
|
24
|
+
// - `$generate-base-utilities`: A flag to determine if the base utility classes should be generated.
|
|
24
25
|
// - `$screen-aware`: A flag to generate screen-aware utility classes.
|
|
25
26
|
// - `$theme-aware`: A flag to generate theme-aware utility classes.
|
|
26
27
|
// - `$state-aware`: A flag to generate state-aware utility classes.
|
|
@@ -34,8 +35,7 @@
|
|
|
34
35
|
// - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
|
|
35
36
|
// - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
|
|
36
37
|
// - `$display-selector-prefix`: The prefix for the display utility classes.
|
|
37
|
-
// - `$
|
|
38
|
-
// - `$custom-display-properties`: The custom properties and values for the display utility classes.
|
|
38
|
+
// - `$custom-display-properties`: [DEPRECATED] The custom properties and values for the display utility classes.
|
|
39
39
|
// - `$display-properties`: The merged properties and values for the display utility classes.
|
|
40
40
|
//
|
|
41
41
|
// Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
|