@graupl/core 1.0.0-beta.51 → 1.0.0-beta.52

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 (41) hide show
  1. package/dist/css/graupl.css +1 -1
  2. package/dist/css/graupl.css.map +1 -1
  3. package/dist/css/layout/columns.css +1 -1
  4. package/dist/css/layout/columns.css.map +1 -1
  5. package/dist/css/layout/flex-columns.css.map +1 -1
  6. package/dist/css/layout.css +1 -1
  7. package/dist/css/layout.css.map +1 -1
  8. package/dist/css/utilities/grid.css +2 -0
  9. package/dist/css/utilities/grid.css.map +1 -0
  10. package/dist/css/utilities.css +1 -1
  11. package/dist/css/utilities.css.map +1 -1
  12. package/package.json +1 -1
  13. package/scss/utilities/grid.scss +3 -0
  14. package/src/scss/_defaults.scss +4 -0
  15. package/src/scss/layout/columns/_defaults.scss +26 -4
  16. package/src/scss/layout/columns/_index.scss +346 -35
  17. package/src/scss/layout/flex-columns/_defaults.scss +2 -2
  18. package/src/scss/layout/flex-columns/_index.scss +41 -41
  19. package/src/scss/utilities/_index.scss +1 -0
  20. package/src/scss/utilities/_template/_index.scss +1 -1
  21. package/src/scss/utilities/grid/_defaults.scss +89 -0
  22. package/src/scss/utilities/grid/_index.scss +236 -0
  23. package/src/scss/utilities/grid/_variables.scss +6 -0
  24. package/src/scss/utilities/grid/col-span/_defaults.scss +102 -0
  25. package/src/scss/utilities/grid/col-span/_index.scss +124 -0
  26. package/src/scss/utilities/grid/col-span/_variables.scss +6 -0
  27. package/src/scss/utilities/grid/grid-column/_defaults.scss +104 -0
  28. package/src/scss/utilities/grid/grid-column/_index.scss +140 -0
  29. package/src/scss/utilities/grid/grid-column/_variables.scss +6 -0
  30. package/src/scss/utilities/grid/grid-row/_defaults.scss +104 -0
  31. package/src/scss/utilities/grid/grid-row/_index.scss +140 -0
  32. package/src/scss/utilities/grid/grid-row/_variables.scss +6 -0
  33. package/src/scss/utilities/grid/grid-template-columns/_defaults.scss +102 -0
  34. package/src/scss/utilities/grid/grid-template-columns/_index.scss +124 -0
  35. package/src/scss/utilities/grid/grid-template-columns/_variables.scss +6 -0
  36. package/src/scss/utilities/grid/grid-template-rows/_defaults.scss +102 -0
  37. package/src/scss/utilities/grid/grid-template-rows/_index.scss +124 -0
  38. package/src/scss/utilities/grid/grid-template-rows/_variables.scss +6 -0
  39. package/src/scss/utilities/grid/row-span/_defaults.scss +102 -0
  40. package/src/scss/utilities/grid/row-span/_index.scss +124 -0
  41. package/src/scss/utilities/grid/row-span/_variables.scss +6 -0
@@ -156,47 +156,47 @@
156
156
  // | `--graupl-flex-columns-color` | The text color of the flex columns component. | `var(--graupl-color)` |
157
157
  //
158
158
  // The following sass variables can be used to customize the generation of the flex columns component:
159
- // | Variable | Description | Default Value |
160
- // | -------------------------------------------------------- | ---------------------------------------------------------------- | ---------------- |
161
- // | `$selector-base` | The base selector for the component. | `"."` |
162
- // | `$modifier-selector-base` | The base selector for component modifiers. | `"."` |
163
- // | `$generate-base-theme-map` | Flag to generate the base theme map. | `true` |
164
- // | `$themeable` | Flag to generate theme modifiers. | `false` |
165
- // | `$screen-aware` | Enables screen-aware column variants. | `true` |
166
- // | `$theme-aware` | Enables theme-aware column variants. | `false` |
167
- // | `$scheme-aware` | Enables scheme-aware column variants. | `false` |
168
- // | `$state-aware` | Enables state-aware column variants. | `false` |
169
- // | `$container-aware` | Enables container-aware column variants. | `true` |
170
- // | `$flex-columns-selector-base` | The base selector for the flex columns component. | `"."` |
171
- // | `$flex-columns-selector` | The selector for the flex columns component. | `"flex-columns"` |
172
- // | `$flex-columns-theme-selector-base` | The selector base for flex columns theme modifiers. | `"."` |
173
- // | `$flex-columns-theme-selector-prefix` | The flex columns theme modifier selector prefix. | `""` |
174
- // | `$flex-columns-column-selector-base` | The base selector for the column class. | `"."` |
175
- // | `$flex-columns-column-selector` | The selector for the column class. | `"col-"` |
176
- // | `$flex-columns-fill-selector-base` | The base selector for the fill class. | `"."` |
177
- // | `$flex-columns-fill-selector` | The selector for the fill class. | `"fill"` |
178
- // | `$flex-columns-column-screen-aware-selector-prefix` | Prefix to the screen-aware portion of column selectors. | `""` |
179
- // | `$flex-columns-column-screen-aware-selector-suffix` | Suffix to the screen-aware portion of column selectors. | `""` |
180
- // | `$flex-columns-column-screen-aware-selector-separator` | Separator inserted for screen-aware column selectors. | `"\\:"` |
181
- // | `$flex-columns-column-theme-aware-selector-prefix` | Prefix to the theme-aware portion of column selectors. | `""` |
182
- // | `$flex-columns-column-theme-aware-selector-suffix` | Suffix to the theme-aware portion of column selectors. | `"-theme"` |
183
- // | `$flex-columns-column-theme-aware-selector-separator` | Separator inserted for theme-aware column selectors. | `"\\:"` |
184
- // | `$flex-columns-column-scheme-aware-selector-prefix` | Prefix to the scheme-aware portion of column selectors. | `""` |
185
- // | `$flex-columns-column-scheme-aware-selector-suffix` | Suffix to the scheme-aware portion of column selectors. | `"-mode"` |
186
- // | `$flex-columns-column-scheme-aware-selector-separator` | Separator inserted for scheme-aware column selectors. | `"\\:"` |
187
- // | `$flex-columns-column-state-aware-selector-prefix` | Prefix to the state-aware portion of column selectors. | `""` |
188
- // | `$flex-columns-column-state-aware-selector-suffix` | Suffix to the state-aware portion of column selectors. | `""` |
189
- // | `$flex-columns-column-state-aware-selector-separator` | Separator inserted for state-aware column selectors. | `"\\:"` |
190
- // | `$flex-columns-column-container-aware-selector-prefix` | Prefix to the container-aware portion of column selectors. | `"cq\\:"` |
191
- // | `$flex-columns-column-container-aware-selector-suffix` | Suffix to the container-aware portion of column selectors. | `""` |
192
- // | `$flex-columns-column-container-aware-selector-separator`| Separator inserted for container-aware column selectors. | `"\\:"` |
193
- // | `$flex-columns-min-count` | The minimum number of columns used to generate `.col-#` classes. | `1` |
194
- // | `$flex-columns-max-count` | The maximum number of columns used to generate `.col-#` classes. | `12` |
195
- // | `$flex-columns-size` | The default size of a column. | `auto` |
196
- // | `$flex-columns-max-width` | The default maximum width of a column. | `unset` |
197
- // | `$flex-columns-container-type` | The container type applied to the flex columns component. | `"inline-size"` |
198
- // | `$flex-columns-theme-mappings` | Map of properties/shades for flex columns themes. | `()` |
199
- // | `$flex-columns-theme-map` | Expanded map of properties/colors/shades. | `()` |
159
+ // | Variable | Description | Default Value |
160
+ // | --------------------------------------------------------- | ---------------------------------------------------------------- | ---------------- |
161
+ // | `$selector-base` | The base selector for the component. | `"."` |
162
+ // | `$modifier-selector-base` | The base selector for component modifiers. | `"."` |
163
+ // | `$generate-base-theme-map` | Flag to generate the base theme map. | `true` |
164
+ // | `$themeable` | Flag to generate theme modifiers. | `false` |
165
+ // | `$screen-aware` | Enables screen-aware column variants. | `true` |
166
+ // | `$theme-aware` | Enables theme-aware column variants. | `false` |
167
+ // | `$scheme-aware` | Enables scheme-aware column variants. | `false` |
168
+ // | `$state-aware` | Enables state-aware column variants. | `false` |
169
+ // | `$container-aware` | Enables container-aware column variants. | `true` |
170
+ // | `$flex-columns-selector-base` | The base selector for the flex columns component. | `"."` |
171
+ // | `$flex-columns-selector` | The selector for the flex columns component. | `"flex-columns"` |
172
+ // | `$flex-columns-theme-selector-base` | The selector base for flex columns theme modifiers. | `"."` |
173
+ // | `$flex-columns-theme-selector-prefix` | The flex columns theme modifier selector prefix. | `""` |
174
+ // | `$flex-columns-column-selector-base` | The base selector for the column class. | `"."` |
175
+ // | `$flex-columns-column-selector` | The selector for the column class. | `"col-"` |
176
+ // | `$flex-columns-fill-selector-base` | The base selector for the fill class. | `"."` |
177
+ // | `$flex-columns-fill-selector` | The selector for the fill class. | `"fill"` |
178
+ // | `$flex-columns-column-screen-aware-selector-prefix` | Prefix to the screen-aware portion of column selectors. | `""` |
179
+ // | `$flex-columns-column-screen-aware-selector-suffix` | Suffix to the screen-aware portion of column selectors. | `""` |
180
+ // | `$flex-columns-column-screen-aware-selector-separator` | Separator inserted for screen-aware column selectors. | `"\\:"` |
181
+ // | `$flex-columns-column-theme-aware-selector-prefix` | Prefix to the theme-aware portion of column selectors. | `""` |
182
+ // | `$flex-columns-column-theme-aware-selector-suffix` | Suffix to the theme-aware portion of column selectors. | `"-theme"` |
183
+ // | `$flex-columns-column-theme-aware-selector-separator` | Separator inserted for theme-aware column selectors. | `"\\:"` |
184
+ // | `$flex-columns-column-scheme-aware-selector-prefix` | Prefix to the scheme-aware portion of column selectors. | `""` |
185
+ // | `$flex-columns-column-scheme-aware-selector-suffix` | Suffix to the scheme-aware portion of column selectors. | `"-mode"` |
186
+ // | `$flex-columns-column-scheme-aware-selector-separator` | Separator inserted for scheme-aware column selectors. | `"\\:"` |
187
+ // | `$flex-columns-column-state-aware-selector-prefix` | Prefix to the state-aware portion of column selectors. | `""` |
188
+ // | `$flex-columns-column-state-aware-selector-suffix` | Suffix to the state-aware portion of column selectors. | `""` |
189
+ // | `$flex-columns-column-state-aware-selector-separator` | Separator inserted for state-aware column selectors. | `"\\:"` |
190
+ // | `$flex-columns-column-container-aware-selector-prefix` | Prefix to the container-aware portion of column selectors. | `"cq\\:"` |
191
+ // | `$flex-columns-column-container-aware-selector-suffix` | Suffix to the container-aware portion of column selectors. | `""` |
192
+ // | `$flex-columns-column-container-aware-selector-separator` | Separator inserted for container-aware column selectors. | `"\\:"` |
193
+ // | `$flex-columns-min-count` | The minimum number of columns used to generate `.col-#` classes. | `1` |
194
+ // | `$flex-columns-max-count` | The maximum number of columns used to generate `.col-#` classes. | `12` |
195
+ // | `$flex-columns-size` | The default size of a column. | `auto` |
196
+ // | `$flex-columns-max-width` | The default maximum width of a column. | `unset` |
197
+ // | `$flex-columns-container-type` | The container type applied to the flex columns component. | `"inline-size"` |
198
+ // | `$flex-columns-theme-mappings` | Map of properties/shades for flex columns themes. | `()` |
199
+ // | `$flex-columns-theme-map` | Expanded map of properties/colors/shades. | `()` |
200
200
  //
201
201
  // @example
202
202
  // <div class="flex-columns">
@@ -10,6 +10,7 @@
10
10
  @use "display";
11
11
  @use "flex";
12
12
  @use "float";
13
+ @use "grid";
13
14
  @use "gradient";
14
15
  @use "height";
15
16
  @use "inline-size";
@@ -3,7 +3,7 @@
3
3
  // This file generates the [_template] utility classes provided by Graupl.
4
4
  //
5
5
  // The following classes are generated by default:
6
- // - `.template-class`: Applies the base value for the property.
6
+ // - `.template-class`: Sets the `template` property to `value`.
7
7
  //
8
8
  // The following custom properties control the generated classes:
9
9
  // | Property | Description | Default Value |
@@ -0,0 +1,89 @@
1
+ // @graupl/core grid utilities default values.
2
+ //
3
+ // Generally, these should not be used directly when styling components unless a static value is needed.
4
+ // They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
5
+ //
6
+ // They should not be used to define direct property values (i.e. font-size, color, etc.).
7
+ // Those should be defined as custom properties in the `_variables.scss` file.
8
+
9
+ @use "../../defaults" as root-defaults;
10
+ @use "../../functions/utility";
11
+ @use "../../variables" as root-variables;
12
+ @use "sass:map";
13
+
14
+ // Utility modifiers.
15
+ $selector-base: root-defaults.$utility-selector-base !default;
16
+ $selector-prefix: root-defaults.$utility-selector-prefix !default;
17
+ $selector-suffix: root-defaults.$utility-selector-suffix !default;
18
+ $selector-separator: root-defaults.$utility-selector-separator !default;
19
+ $use-important: root-defaults.$use-important !default;
20
+ $generate-base-utilities: root-defaults.$generate-base-utilities !default;
21
+ $screen-aware: false !default;
22
+ $theme-aware: false !default;
23
+ $scheme-aware: false !default;
24
+ $state-aware: false !default;
25
+ $container-aware: false !default;
26
+ $screen-aware-selector-prefix: root-defaults.$utility-screen-aware-selector-prefix !default;
27
+ $screen-aware-selector-suffix: root-defaults.$utility-screen-aware-selector-suffix !default;
28
+ $screen-aware-selector-separator: root-defaults.$utility-screen-aware-selector-separator !default;
29
+ $theme-aware-selector-prefix: root-defaults.$utility-theme-aware-selector-prefix !default;
30
+ $theme-aware-selector-suffix: root-defaults.$utility-theme-aware-selector-suffix !default;
31
+ $theme-aware-selector-separator: root-defaults.$utility-theme-aware-selector-separator !default;
32
+ $scheme-aware-selector-prefix: root-defaults.$utility-scheme-aware-selector-prefix !default;
33
+ $scheme-aware-selector-suffix: root-defaults.$utility-scheme-aware-selector-suffix !default;
34
+ $scheme-aware-selector-separator: root-defaults.$utility-scheme-aware-selector-separator !default;
35
+ $state-aware-selector-prefix: root-defaults.$utility-state-aware-selector-prefix !default;
36
+ $state-aware-selector-suffix: root-defaults.$utility-state-aware-selector-suffix !default;
37
+ $state-aware-selector-separator: root-defaults.$utility-state-aware-selector-separator !default;
38
+ $container-aware-selector-prefix: root-defaults.$utility-container-aware-selector-prefix !default;
39
+ $container-aware-selector-suffix: root-defaults.$utility-container-aware-selector-suffix !default;
40
+ $container-aware-selector-separator: root-defaults.$utility-container-aware-selector-separator !default;
41
+ $grid-column-min-count: root-defaults.$column-layout-min-count !default;
42
+ $grid-column-max-count: root-defaults.$column-layout-max-count !default;
43
+ $grid-row-min-count: root-defaults.$row-layout-min-count !default;
44
+ $grid-row-max-count: root-defaults.$row-layout-max-count !default;
45
+
46
+ // Properties.
47
+ $-utility-properties: ();
48
+ $utility-properties: () !default;
49
+
50
+ // Values.
51
+ $-utility-values: ();
52
+ $utility-values: () !default;
53
+
54
+ // Merge custom and base properties/values if generating base utilities.
55
+ @if $generate-base-utilities {
56
+ $utility-properties: map.deep-merge(
57
+ $-utility-properties,
58
+ $utility-properties
59
+ );
60
+ $utility-values: map.deep-merge($-utility-values, $utility-values);
61
+ }
62
+
63
+ // Set up all utility classes and properties for cleaner generation in the index file.
64
+ //
65
+ // The end result of this map is something like:
66
+ // $-utility-map: (
67
+ // class-name: (
68
+ // property: value,
69
+ // property: value,
70
+ // ...
71
+ // ),
72
+ // class-name: (
73
+ // property: value,
74
+ // property: value,
75
+ // ...
76
+ // ),
77
+ // ...
78
+ // );
79
+ $-utility-map: ();
80
+ $-utility-map: map.deep-merge(
81
+ $-utility-map,
82
+ utility.generate-utility-map(
83
+ $utility-properties,
84
+ $utility-values,
85
+ $selector-separator
86
+ )
87
+ );
88
+ $utility-map: () !default;
89
+ $utility-map: map.deep-merge($-utility-map, $utility-map);
@@ -0,0 +1,236 @@
1
+ // @graupl/core grid utilities styles.
2
+ //
3
+ // This file generates the grid utility classes provided by Graupl.
4
+ //
5
+ // The following classes are generated by default:
6
+ // - `.column-start-first`: Sets the `grid-column-start` property to `1`.
7
+ // - `.column-start-last`: Sets the `grid-column-start` property to `-1`.
8
+ // - `.column-start-auto`: Sets the `grid-column-start` property to `auto`.
9
+ // - `.column-start-1`: Sets the `grid-column-start` property to `1`.
10
+ // - `.column-start-2`: Sets the `grid-column-start` property to `2`.
11
+ // - `.column-start-3`: Sets the `grid-column-start` property to `3`.
12
+ // - `.column-start-4`: Sets the `grid-column-start` property to `4`.
13
+ // - `.column-start-5`: Sets the `grid-column-start` property to `5`.
14
+ // - `.column-start-6`: Sets the `grid-column-start` property to `6`.
15
+ // - `.column-start-7`: Sets the `grid-column-start` property to `7`.
16
+ // - `.column-start-8`: Sets the `grid-column-start` property to `8`.
17
+ // - `.column-start-9`: Sets the `grid-column-start` property to `9`.
18
+ // - `.column-start-10`: Sets the `grid-column-start` property to `10`.
19
+ // - `.column-start-11`: Sets the `grid-column-start` property to `11`.
20
+ // - `.column-start-12`: Sets the `grid-column-start` property to `12`.
21
+ // - `.column-end-first`: Sets the `grid-column-end` property to `1`.
22
+ // - `.column-end-last`: Sets the `grid-column-end` property to `-1`.
23
+ // - `.column-end-auto`: Sets the `grid-column-end` property to `auto`.
24
+ // - `.column-end-1`: Sets the `grid-column-end` property to `1`.
25
+ // - `.column-end-2`: Sets the `grid-column-end` property to `2`.
26
+ // - `.column-end-3`: Sets the `grid-column-end` property to `3`.
27
+ // - `.column-end-4`: Sets the `grid-column-end` property to `4`.
28
+ // - `.column-end-5`: Sets the `grid-column-end` property to `5`.
29
+ // - `.column-end-6`: Sets the `grid-column-end` property to `6`.
30
+ // - `.column-end-7`: Sets the `grid-column-end` property to `7`.
31
+ // - `.column-end-8`: Sets the `grid-column-end` property to `8`.
32
+ // - `.column-end-9`: Sets the `grid-column-end` property to `9`.
33
+ // - `.column-end-10`: Sets the `grid-column-end` property to `10`.
34
+ // - `.column-end-11`: Sets the `grid-column-end` property to `11`.
35
+ // - `.column-end-12`: Sets the `grid-column-end` property to `12`.
36
+ // - `.row-start-first`: Sets the `grid-row-start` property to `1`.
37
+ // - `.row-start-last`: Sets the `grid-row-start` property to `-1`.
38
+ // - `.row-start-auto`: Sets the `grid-row-start` property to `auto`.
39
+ // - `.row-start-1`: Sets the `grid-row-start` property to `1`.
40
+ // - `.row-start-2`: Sets the `grid-row-start` property to `2`.
41
+ // - `.row-start-3`: Sets the `grid-row-start` property to `3`.
42
+ // - `.row-start-4`: Sets the `grid-row-start` property to `4`.
43
+ // - `.row-start-5`: Sets the `grid-row-start` property to `5`.
44
+ // - `.row-start-6`: Sets the `grid-row-start` property to `6`.
45
+ // - `.row-start-7`: Sets the `grid-row-start` property to `7`.
46
+ // - `.row-start-8`: Sets the `grid-row-start` property to `8`.
47
+ // - `.row-start-9`: Sets the `grid-row-start` property to `9`.
48
+ // - `.row-start-10`: Sets the `grid-row-start` property to `10`.
49
+ // - `.row-start-11`: Sets the `grid-row-start` property to `11`.
50
+ // - `.row-start-12`: Sets the `grid-row-start` property to `12`.
51
+ // - `.row-end-first`: Sets the `grid-row-end` property to `1`.
52
+ // - `.row-end-last`: Sets the `grid-row-end` property to `-1`.
53
+ // - `.row-end-auto`: Sets the `grid-row-end` property to `auto`.
54
+ // - `.row-end-1`: Sets the `grid-row-end` property to `1`.
55
+ // - `.row-end-2`: Sets the `grid-row-end` property to `2`.
56
+ // - `.row-end-3`: Sets the `grid-row-end` property to `3`.
57
+ // - `.row-end-4`: Sets the `grid-row-end` property to `4`.
58
+ // - `.row-end-5`: Sets the `grid-row-end` property to `5`.
59
+ // - `.row-end-6`: Sets the `grid-row-end` property to `6`.
60
+ // - `.row-end-7`: Sets the `grid-row-end` property to `7`.
61
+ // - `.row-end-8`: Sets the `grid-row-end` property to `8`.
62
+ // - `.row-end-9`: Sets the `grid-row-end` property to `9`.
63
+ // - `.row-end-10`: Sets the `grid-row-end` property to `10`.
64
+ // - `.row-end-11`: Sets the `grid-row-end` property to `11`.
65
+ // - `.row-end-12`: Sets the `grid-row-end` property to `12`.
66
+ // - `.grid-cols-auto`: Sets the `grid-template-columns` property to `auto`.
67
+ // - `.grid-cols-subgrid`: Sets the `grid-template-columns` property to `subgrid`.
68
+ // - `.grid-cols-1`: Sets the `grid-template-columns` property to `1`.
69
+ // - `.grid-cols-2`: Sets the `grid-template-columns` property to `2`.
70
+ // - `.grid-cols-3`: Sets the `grid-template-columns` property to `3`.
71
+ // - `.grid-cols-4`: Sets the `grid-template-columns` property to `4`.
72
+ // - `.grid-cols-5`: Sets the `grid-template-columns` property to `5`.
73
+ // - `.grid-cols-6`: Sets the `grid-template-columns` property to `6`.
74
+ // - `.grid-cols-7`: Sets the `grid-template-columns` property to `7`.
75
+ // - `.grid-cols-8`: Sets the `grid-template-columns` property to `8`.
76
+ // - `.grid-cols-9`: Sets the `grid-template-columns` property to `9`.
77
+ // - `.grid-cols-10`: Sets the `grid-template-columns` property to `10`.
78
+ // - `.grid-cols-11`: Sets the `grid-template-columns` property to `11`.
79
+ // - `.grid-cols-12`: Sets the `grid-template-columns` property to `12`.
80
+ // - `.grid-rows-auto`: Sets the `grid-template-rows` property to `auto`.
81
+ // - `.grid-rows-subgrid`: Sets the `grid-template-rows` property to `subgrid`.
82
+ // - `.grid-rows-1`: Sets the `grid-template-rows` property to `1`.
83
+ // - `.grid-rows-2`: Sets the `grid-template-rows` property to `2`.
84
+ // - `.grid-rows-3`: Sets the `grid-template-rows` property to `3`.
85
+ // - `.grid-rows-4`: Sets the `grid-template-rows` property to `4`.
86
+ // - `.grid-rows-5`: Sets the `grid-template-rows` property to `5`.
87
+ // - `.grid-rows-6`: Sets the `grid-template-rows` property to `6`.
88
+ // - `.grid-rows-7`: Sets the `grid-template-rows` property to `7`.
89
+ // - `.grid-rows-8`: Sets the `grid-template-rows` property to `8`.
90
+ // - `.grid-rows-9`: Sets the `grid-template-rows` property to `9`.
91
+ // - `.grid-rows-10`: Sets the `grid-template-rows` property to `10`.
92
+ // - `.grid-rows-11`: Sets the `grid-template-rows` property to `11`.
93
+ // - `.grid-rows-12`: Sets the `grid-template-rows` property to `12`.
94
+ // - `.col-span-auto`: Sets the `grid-column` property to `span auto`.
95
+ // - `.col-span-full`: Sets the `grid-column` property to `1 / -1`.
96
+ // - `.col-span-1`: Sets the `grid-column` property to `span 1`.
97
+ // - `.col-span-2`: Sets the `grid-column` property to `span 2`.
98
+ // - `.col-span-3`: Sets the `grid-column` property to `span 3`.
99
+ // - `.col-span-4`: Sets the `grid-column` property to `span 4`.
100
+ // - `.col-span-5`: Sets the `grid-column` property to `span 5`.
101
+ // - `.col-span-6`: Sets the `grid-column` property to `span 6`.
102
+ // - `.col-span-7`: Sets the `grid-column` property to `span 7`.
103
+ // - `.col-span-8`: Sets the `grid-column` property to `span 8`.
104
+ // - `.col-span-9`: Sets the `grid-column` property to `span 9`.
105
+ // - `.col-span-10`: Sets the `grid-column` property to `span 10`.
106
+ // - `.col-span-11`: Sets the `grid-column` property to `span 11`.
107
+ // - `.col-span-12`: Sets the `grid-column` property to `span 12`.
108
+ // - `.row-span-auto`: Sets the `grid-row` property to `span auto`.
109
+ // - `.row-span-full`: Sets the `grid-row` property to `1 / -1`.
110
+ // - `.row-span-1`: Sets the `grid-row` property to `span 1`.
111
+ // - `.row-span-2`: Sets the `grid-row` property to `span 2`.
112
+ // - `.row-span-3`: Sets the `grid-row` property to `span 3`.
113
+ // - `.row-span-4`: Sets the `grid-row` property to `span 4`.
114
+ // - `.row-span-5`: Sets the `grid-row` property to `span 5`.
115
+ // - `.row-span-6`: Sets the `grid-row` property to `span 6`.
116
+ // - `.row-span-7`: Sets the `grid-row` property to `span 7`.
117
+ // - `.row-span-8`: Sets the `grid-row` property to `span 8`.
118
+ // - `.row-span-9`: Sets the `grid-row` property to `span 9`.
119
+ // - `.row-span-10`: Sets the `grid-row` property to `span 10`.
120
+ // - `.row-span-11`: Sets the `grid-row` property to `span 11`.
121
+ // - `.row-span-12`: Sets the `grid-row` property to `span 12`.
122
+ //
123
+ // The following custom properties control the generated classes:
124
+ // | Property | Description | Default Value |
125
+ // | -------- | ----------- | ------------- |
126
+ // | N/A | N/A | N/A |
127
+ //
128
+ // This utility does not define any custom properties.
129
+ //
130
+ // The following variables control the generated classes:
131
+ // | Variable | Description | Default Value |
132
+ // | ------------------------------------ | ----------------------------------------------------------- | ------------- |
133
+ // | `$selector-base` | Base selector for utility classes. | `"."` |
134
+ // | `$selector-prefix` | The selector prefix for all utility classes. | `""` |
135
+ // | `$selector-suffix` | The selctor suffix for all utility classes. | `""` |
136
+ // | `$selector-separator` | The selector separator for all utility classes. | `""` |
137
+ // | `$use-important` | Appends `!important` to generated utility declarations. | `true` |
138
+ // | `$generate-base-utilities` | Generates the base utility classes. | `true` |
139
+ // | `$screen-aware` | Enables screen-aware utility variants. | `false` |
140
+ // | `$theme-aware` | Enables theme-aware utility variants. | `false` |
141
+ // | `$scheme-aware` | Enables scheme-aware utility variants. | `false` |
142
+ // | `$state-aware` | Enables state-aware utility variants. | `false` |
143
+ // | `$container-aware` | Enables container-aware utility variants. | `false` |
144
+ // | `$screen-aware-selector-prefix` | Prefix to the screen-aware portion of utility selectors. | `""` |
145
+ // | `$screen-aware-selector-suffix` | Suffix to the screen-aware portion of utility selectors. | `""` |
146
+ // | `$screen-aware-selector-separator` | Separator inserted for screen-aware utility selectors. | `"\\:"` |
147
+ // | `$theme-aware-selector-prefix` | Prefix to the theme-aware portion of utility selectors. | `""` |
148
+ // | `$theme-aware-selector-suffix` | Suffix to the theme-aware portion of utility selectors. | `"-theme"` |
149
+ // | `$theme-aware-selector-separator` | Separator inserted for theme-aware utility selectors. | `"\\:"` |
150
+ // | `$scheme-aware-selector-prefix` | Prefix to the scheme-aware portion of utility selectors. | `""` |
151
+ // | `$scheme-aware-selector-suffix` | Suffix to the scheme-aware portion of utility selectors. | `"-mode"` |
152
+ // | `$scheme-aware-selector-separator` | Separator inserted for scheme-aware utility selectors. | `"\\:"` |
153
+ // | `$state-aware-selector-prefix` | Prefix to the state-aware portion of utility selectors. | `""` |
154
+ // | `$state-aware-selector-suffix` | Suffix to the state-aware portion of utility selectors. | `""` |
155
+ // | `$state-aware-selector-separator` | Separator inserted for state-aware utility selectors. | `"\\:"` |
156
+ // | `$container-aware-selector-prefix` | Prefix to the container-aware portion of utility selectors. | `"cq\\:"` |
157
+ // | `$container-aware-selector-suffix` | Suffix to the container-aware portion of utility selectors. | `""` |
158
+ // | `$container-aware-selector-separator`| Separator inserted for container-aware utility selectors. | `"\\:"` |
159
+ // | `$utility-properties` | Map of utility properties. | `()` |
160
+ // | `$utility-values` | Map of utility values. | `()` |
161
+ // | `$utility-map` | Map of utility property/value pairs. | `()` |
162
+ // | `$grid-column-min-count` | The minimum column count for generated utilities. | `1` |
163
+ // | `$grid-column-max-count` | The maximum column count for generated utilities. | `12` |
164
+ // | `$grid-row-min-count` | The minimum row count for generated utilities. | `1` |
165
+ // | `$grid-row-max-count` | The maximum row count for generated utilities. | `12` |
166
+ //
167
+ // Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, `$scheme-aware`, `$state-aware`, or `$container-aware` to `true`.
168
+ // By default, no responsive utility classes are generated for grid.
169
+ //
170
+ // When set to true, screen-aware utility classes will be generated for each screen size in the following pattern: `.{screen-modifier}:{utility-selector}`
171
+ //
172
+ // e.g. `sm:grid-cols-5` will apply the `grid-cols-5` class on small-sized screens and up.
173
+ //
174
+ // When set to true, theme-aware utility classes will be generated for each theme in the following pattern: `.{theme-modifier}:{utility-selector}`
175
+ //
176
+ // e.g. `default-theme:grid-cols-5` will apply the `grid-cols-5` class when using the default theme.
177
+ //
178
+ // When set to true, scheme-aware utility classes will be generated for each theme in the following pattern: `.{scheme-modifier}:{utility-selector}`
179
+ //
180
+ // e.g. `dark-mode:grid-cols-5` will apply the `grid-cols-5` class when dark-mode is active.
181
+ //
182
+ // When set to true, state-aware utility classes will be generated for each state in the following pattern: `.{state-modifier}:{utility-selector}`
183
+ //
184
+ // e.g. `hover:grid-cols-5` will apply the `grid-cols-5` class when hovered.
185
+ //
186
+ // When set to true, container-aware utility classes will be generated for each container in the following pattern: `.{container-modifier}:{utility-selector}`
187
+ //
188
+ // e.g. `cq:md:grid-cols-5` will apply the `grid-cols-5` class on medium-sized containers and up.
189
+ //
190
+ // @example
191
+ // <div class="display-grid grid-cols-5 grid-rows-2">This content will have 5 columns and 2 rows.</div>
192
+
193
+ @use "../../mixins/layer" as *;
194
+ @use "../../mixins/utility";
195
+ @use "defaults";
196
+ @use "variables" as *;
197
+
198
+ // Import child utilities.
199
+ @use "grid-column";
200
+ @use "grid-row";
201
+ @use "grid-template-columns";
202
+ @use "grid-template-rows";
203
+ @use "col-span";
204
+ @use "row-span";
205
+
206
+ @include layer(utilities) {
207
+ // Create a utitlity for each entry in the utility map.
208
+ @include utility.generate(
209
+ $map: defaults.$utility-map,
210
+ $selector-base: defaults.$selector-base,
211
+ $selector-prefix: defaults.$selector-prefix,
212
+ $selector-suffix: defaults.$selector-suffix,
213
+ $screen-aware: defaults.$screen-aware,
214
+ $screen-aware-selector-prefix: defaults.$screen-aware-selector-prefix,
215
+ $screen-aware-selector-suffix: defaults.$screen-aware-selector-suffix,
216
+ $screen-aware-selector-separator: defaults.$screen-aware-selector-separator,
217
+ $theme-aware: defaults.$theme-aware,
218
+ $theme-aware-selector-prefix: defaults.$theme-aware-selector-prefix,
219
+ $theme-aware-selector-suffix: defaults.$theme-aware-selector-suffix,
220
+ $theme-aware-selector-separator: defaults.$theme-aware-selector-separator,
221
+ $scheme-aware: defaults.$scheme-aware,
222
+ $scheme-aware-selector-prefix: defaults.$scheme-aware-selector-prefix,
223
+ $scheme-aware-selector-suffix: defaults.$scheme-aware-selector-suffix,
224
+ $scheme-aware-selector-separator: defaults.$scheme-aware-selector-separator,
225
+ $state-aware: defaults.$state-aware,
226
+ $state-aware-selector-prefix: defaults.$state-aware-selector-prefix,
227
+ $state-aware-selector-suffix: defaults.$state-aware-selector-suffix,
228
+ $state-aware-selector-separator: defaults.$state-aware-selector-separator,
229
+ $container-aware: defaults.$container-aware,
230
+ $container-aware-selector-prefix: defaults.$container-aware-selector-prefix,
231
+ $container-aware-selector-suffix: defaults.$container-aware-selector-suffix,
232
+ $container-aware-selector-separator:
233
+ defaults.$container-aware-selector-separator,
234
+ $important: defaults.$use-important
235
+ );
236
+ }
@@ -0,0 +1,6 @@
1
+ // @graupl/core grid utilities variables.
2
+ //
3
+ // These values are to be used to directly style components and provide a
4
+ // cleaner way to reference custom properties.
5
+
6
+ @use "defaults";
@@ -0,0 +1,102 @@
1
+ // @graupl/core column-span utilities default values.
2
+ //
3
+ // Generally, these should not be used directly when styling components unless a static value is needed.
4
+ // They are mainly used to provide class selectors, fallbacks for custom properties, or loop values.
5
+ //
6
+ // They should not be used to define direct property values (i.e. font-size, color, etc.).
7
+ // Those should be defined as custom properties in the `_variables.scss` file.
8
+
9
+ @use "../defaults" as grid-defaults;
10
+ @use "../../../functions/utility";
11
+ @use "sass:map";
12
+ @use "sass:math";
13
+
14
+ // Utility modifiers.
15
+ $selector-base: grid-defaults.$selector-base !default;
16
+ $selector-prefix: grid-defaults.$selector-prefix !default;
17
+ $selector-suffix: grid-defaults.$selector-suffix !default;
18
+ $selector-separator: grid-defaults.$selector-separator !default;
19
+ $use-important: grid-defaults.$use-important !default;
20
+ $generate-base-utilities: grid-defaults.$generate-base-utilities !default;
21
+ $screen-aware: grid-defaults.$screen-aware !default;
22
+ $theme-aware: grid-defaults.$theme-aware !default;
23
+ $scheme-aware: grid-defaults.$scheme-aware !default;
24
+ $state-aware: grid-defaults.$state-aware !default;
25
+ $container-aware: grid-defaults.$container-aware !default;
26
+ $screen-aware-selector-prefix: grid-defaults.$screen-aware-selector-prefix !default;
27
+ $screen-aware-selector-suffix: grid-defaults.$screen-aware-selector-suffix !default;
28
+ $screen-aware-selector-separator: grid-defaults.$screen-aware-selector-separator !default;
29
+ $theme-aware-selector-prefix: grid-defaults.$theme-aware-selector-prefix !default;
30
+ $theme-aware-selector-suffix: grid-defaults.$theme-aware-selector-suffix !default;
31
+ $theme-aware-selector-separator: grid-defaults.$theme-aware-selector-separator !default;
32
+ $scheme-aware-selector-prefix: grid-defaults.$scheme-aware-selector-prefix !default;
33
+ $scheme-aware-selector-suffix: grid-defaults.$scheme-aware-selector-suffix !default;
34
+ $scheme-aware-selector-separator: grid-defaults.$scheme-aware-selector-separator !default;
35
+ $state-aware-selector-prefix: grid-defaults.$state-aware-selector-prefix !default;
36
+ $state-aware-selector-suffix: grid-defaults.$state-aware-selector-suffix !default;
37
+ $state-aware-selector-separator: grid-defaults.$state-aware-selector-separator !default;
38
+ $container-aware-selector-prefix: grid-defaults.$container-aware-selector-prefix !default;
39
+ $container-aware-selector-suffix: grid-defaults.$container-aware-selector-suffix !default;
40
+ $container-aware-selector-separator: grid-defaults.$container-aware-selector-separator !default;
41
+ $grid-column-min-count: grid-defaults.$grid-column-min-count;
42
+ $grid-column-max-count: grid-defaults.$grid-column-max-count;
43
+
44
+ // Properties.
45
+ $-utility-properties: (
46
+ "col-span": grid-column,
47
+ );
48
+ $utility-properties: () !default;
49
+
50
+ // Values.
51
+ $-utility-values: (
52
+ "auto": span auto,
53
+ "full": "1 / -1",
54
+ );
55
+ $utility-values: () !default;
56
+
57
+ // Add the count values to the base values.
58
+ @for $i from $grid-column-min-count through $grid-column-max-count {
59
+ $-utility-values: map.merge(
60
+ $-utility-values,
61
+ (
62
+ math.abs($i): span $i,
63
+ )
64
+ );
65
+ }
66
+
67
+ // Merge custom and base properties/values if generating base utilities.
68
+ @if $generate-base-utilities {
69
+ $utility-properties: map.deep-merge(
70
+ $-utility-properties,
71
+ $utility-properties
72
+ );
73
+ $utility-values: map.deep-merge($-utility-values, $utility-values);
74
+ }
75
+
76
+ // Set up all utility classes and properties for cleaner generation in the index file.
77
+ //
78
+ // The end result of this map is something like:
79
+ // $-utility-map: (
80
+ // class-name: (
81
+ // property: value,
82
+ // property: value,
83
+ // ...
84
+ // ),
85
+ // class-name: (
86
+ // property: value,
87
+ // property: value,
88
+ // ...
89
+ // ),
90
+ // ...
91
+ // );
92
+ $-utility-map: ();
93
+ $-utility-map: map.deep-merge(
94
+ $-utility-map,
95
+ utility.generate-utility-map(
96
+ $utility-properties,
97
+ $utility-values,
98
+ $selector-separator
99
+ )
100
+ );
101
+ $utility-map: () !default;
102
+ $utility-map: map.deep-merge($-utility-map, $utility-map);