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

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/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/block-size.css +1 -1
  9. package/dist/css/utilities/block-size.css.map +1 -1
  10. package/dist/css/utilities/grid.css +2 -0
  11. package/dist/css/utilities/grid.css.map +1 -0
  12. package/dist/css/utilities/inline-size.css +1 -1
  13. package/dist/css/utilities/inline-size.css.map +1 -1
  14. package/dist/css/utilities.css +1 -1
  15. package/dist/css/utilities.css.map +1 -1
  16. package/package.json +1 -1
  17. package/scss/utilities/grid.scss +3 -0
  18. package/src/scss/_defaults.scss +4 -0
  19. package/src/scss/layout/columns/_defaults.scss +26 -4
  20. package/src/scss/layout/columns/_index.scss +346 -35
  21. package/src/scss/layout/flex-columns/_defaults.scss +2 -2
  22. package/src/scss/layout/flex-columns/_index.scss +41 -41
  23. package/src/scss/utilities/_index.scss +1 -0
  24. package/src/scss/utilities/_template/_index.scss +1 -1
  25. package/src/scss/utilities/block-size/_defaults.scss +3 -3
  26. package/src/scss/utilities/block-size/_index.scss +84 -84
  27. package/src/scss/utilities/grid/_defaults.scss +89 -0
  28. package/src/scss/utilities/grid/_index.scss +236 -0
  29. package/src/scss/utilities/grid/_variables.scss +6 -0
  30. package/src/scss/utilities/grid/col-span/_defaults.scss +102 -0
  31. package/src/scss/utilities/grid/col-span/_index.scss +124 -0
  32. package/src/scss/utilities/grid/col-span/_variables.scss +6 -0
  33. package/src/scss/utilities/grid/grid-column/_defaults.scss +104 -0
  34. package/src/scss/utilities/grid/grid-column/_index.scss +140 -0
  35. package/src/scss/utilities/grid/grid-column/_variables.scss +6 -0
  36. package/src/scss/utilities/grid/grid-row/_defaults.scss +104 -0
  37. package/src/scss/utilities/grid/grid-row/_index.scss +140 -0
  38. package/src/scss/utilities/grid/grid-row/_variables.scss +6 -0
  39. package/src/scss/utilities/grid/grid-template-columns/_defaults.scss +102 -0
  40. package/src/scss/utilities/grid/grid-template-columns/_index.scss +124 -0
  41. package/src/scss/utilities/grid/grid-template-columns/_variables.scss +6 -0
  42. package/src/scss/utilities/grid/grid-template-rows/_defaults.scss +102 -0
  43. package/src/scss/utilities/grid/grid-template-rows/_index.scss +124 -0
  44. package/src/scss/utilities/grid/grid-template-rows/_variables.scss +6 -0
  45. package/src/scss/utilities/grid/row-span/_defaults.scss +102 -0
  46. package/src/scss/utilities/grid/row-span/_index.scss +124 -0
  47. package/src/scss/utilities/grid/row-span/_variables.scss +6 -0
  48. package/src/scss/utilities/inline-size/_defaults.scss +3 -3
  49. package/src/scss/utilities/inline-size/_index.scss +84 -84
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graupl/core",
3
- "version": "1.0.0-beta.51",
3
+ "version": "1.0.0-beta.53",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "description": "The core module of Graupl, providing essential styles and utilities.",
6
6
  "main": "dist/js/graupl.cjs.js",
@@ -0,0 +1,3 @@
1
+ // @graupl/core grid utilities.
2
+
3
+ @forward "../../src/scss/utilities/grid";
@@ -33,6 +33,10 @@ $show-warnings: true !default;
33
33
 
34
34
  // Layout properties.
35
35
  $content-max-width: 96ch !default;
36
+ $column-layout-min-count: 1 !default;
37
+ $column-layout-max-count: 12 !default;
38
+ $row-layout-min-count: 1 !default;
39
+ $row-layout-max-count: 12 !default;
36
40
 
37
41
  // Screen sizes.
38
42
  $-screen-sizes: (
@@ -15,21 +15,43 @@ $selector-base: root-defaults.$component-selector-base !default;
15
15
  $modifier-selector-base: root-defaults.$modifier-selector-base !default;
16
16
  $generate-base-theme-map: root-defaults.$generate-base-theme-maps !default;
17
17
  $themeable: false !default;
18
+ $screen-aware: true !default;
19
+ $theme-aware: false !default;
20
+ $scheme-aware: false !default;
21
+ $state-aware: false !default;
22
+ $container-aware: true !default;
18
23
  $force-single-columns: true !default;
19
24
  $columns-selector-base: $selector-base !default;
20
25
  $columns-selector: "columns" !default;
21
26
  $columns-theme-selector-base: $modifier-selector-base !default;
22
27
  $columns-theme-selector-prefix: "" !default;
23
- $columns-count-selector-base: $selector-base !default;
28
+ $columns-count-selector-base: $modifier-selector-base !default;
24
29
  $columns-count-selector-prefix: "count-" !default;
25
- $columns-span-selector-base: $selector-base !default;
30
+ $columns-span-selector-base: $modifier-selector-base !default;
26
31
  $columns-span-selector-prefix: "span-" !default;
32
+ $columns-fixed-selector-base: $modifier-selector-base !default;
33
+ $columns-fixed-selector: "fixed" !default;
34
+ $columns-screen-aware-selector-prefix: root-defaults.$screen-aware-selector-prefix !default;
35
+ $columns-screen-aware-selector-suffix: root-defaults.$screen-aware-selector-suffix !default;
36
+ $columns-screen-aware-selector-separator: root-defaults.$screen-aware-selector-separator !default;
37
+ $columns-theme-aware-selector-prefix: root-defaults.$theme-aware-selector-prefix !default;
38
+ $columns-theme-aware-selector-suffix: root-defaults.$theme-aware-selector-suffix !default;
39
+ $columns-theme-aware-selector-separator: root-defaults.$theme-aware-selector-separator !default;
40
+ $columns-scheme-aware-selector-prefix: root-defaults.$scheme-aware-selector-prefix !default;
41
+ $columns-scheme-aware-selector-suffix: root-defaults.$scheme-aware-selector-suffix !default;
42
+ $columns-scheme-aware-selector-separator: root-defaults.$scheme-aware-selector-separator !default;
43
+ $columns-state-aware-selector-prefix: root-defaults.$state-aware-selector-prefix !default;
44
+ $columns-state-aware-selector-suffix: root-defaults.$state-aware-selector-suffix !default;
45
+ $columns-state-aware-selector-separator: root-defaults.$state-aware-selector-separator !default;
46
+ $columns-container-aware-selector-prefix: root-defaults.$container-aware-selector-prefix !default;
47
+ $columns-container-aware-selector-suffix: root-defaults.$container-aware-selector-suffix !default;
48
+ $columns-container-aware-selector-separator: root-defaults.$container-aware-selector-separator !default;
27
49
 
28
50
  // Columns properties.
29
51
  $columns-max-width: 1fr !default;
30
52
  $columns-count: 3 !default;
31
- $columns-min-count: 1 !default;
32
- $columns-max-count: 6 !default;
53
+ $columns-min-count: root-defaults.$column-layout-min-count !default;
54
+ $columns-max-count: root-defaults.$column-layout-max-count !default;
33
55
  $columns-span: 1 !default;
34
56
 
35
57
  // Columns state theme defaults.
@@ -21,12 +21,150 @@
21
21
  // - `.count-4`: Sets the number of columns in the columns component to 4.
22
22
  // - `.count-5`: Sets the number of columns in the columns component to 5.
23
23
  // - `.count-6`: Sets the number of columns in the columns component to 6.
24
+ // - `.count-7`: Sets the number of columns in the columns component to 7.
25
+ // - `.count-8`: Sets the number of columns in the columns component to 8.
26
+ // - `.count-9`: Sets the number of columns in the columns component to 9.
27
+ // - `.count-10`: Sets the number of columns in the columns component to 10.
28
+ // - `.count-11`: Sets the number of columns in the columns component to 11.
29
+ // - `.count-12`: Sets the number of columns in the columns component to 12.
30
+ // - `.fixed`: Sets the min/max columns widths to be equal, forcing a fixed number of columns.
31
+ // - `.xs:fixed`: Sets the min/max columns widths to be equal, forcing a fixed number of columns on extra small screens.
32
+ // - `.sm:fixed`: Sets the min/max columns widths to be equal, forcing a fixed number of columns on small screens.
33
+ // - `.md:fixed`: Sets the min/max columns widths to be equal, forcing a fixed number of columns on medium screens.
34
+ // - `.lg:fixed`: Sets the min/max columns widths to be equal, forcing a fixed number of columns on large screens.
35
+ // - `.xl:fixed`: Sets the min/max columns widths to be equal, forcing a fixed number of columns on extra large screens.
36
+ // - `.xs:count-1`: Sets the number of columns in the columns component to 1 on extra small screens.
37
+ // - `.xs:count-2`: Sets the number of columns in the columns component to 2 on extra small screens.
38
+ // - `.xs:count-3`: Sets the number of columns in the columns component to 3 on extra small screens.
39
+ // - `.xs:count-4`: Sets the number of columns in the columns component to 4 on extra small screens.
40
+ // - `.xs:count-5`: Sets the number of columns in the columns component to 5 on extra small screens.
41
+ // - `.xs:count-6`: Sets the number of columns in the columns component to 6 on extra small screens.
42
+ // - `.xs:count-7`: Sets the number of columns in the columns component to 7 on extra small screens.
43
+ // - `.xs:count-8`: Sets the number of columns in the columns component to 8 on extra small screens.
44
+ // - `.xs:count-9`: Sets the number of columns in the columns component to 9 on extra small screens.
45
+ // - `.xs:count-10`: Sets the number of columns in the columns component to 10 on extra small screens.
46
+ // - `.xs:count-11`: Sets the number of columns in the columns component to 11 on extra small screens.
47
+ // - `.xs:count-12`: Sets the number of columns in the columns component to 12 on extra small screens.
48
+ // - `.sm:count-1`: Sets the number of columns in the columns component to 1 on small screens.
49
+ // - `.sm:count-2`: Sets the number of columns in the columns component to 2 on small screens.
50
+ // - `.sm:count-3`: Sets the number of columns in the columns component to 3 on small screens.
51
+ // - `.sm:count-4`: Sets the number of columns in the columns component to 4 on small screens.
52
+ // - `.sm:count-5`: Sets the number of columns in the columns component to 5 on small screens.
53
+ // - `.sm:count-6`: Sets the number of columns in the columns component to 6 on small screens.
54
+ // - `.sm:count-7`: Sets the number of columns in the columns component to 7 on small screens.
55
+ // - `.sm:count-8`: Sets the number of columns in the columns component to 8 on small screens.
56
+ // - `.sm:count-9`: Sets the number of columns in the columns component to 9 on small screens.
57
+ // - `.sm:count-10`: Sets the number of columns in the columns component to 10 on small screens.
58
+ // - `.sm:count-11`: Sets the number of columns in the columns component to 11 on small screens.
59
+ // - `.sm:count-12`: Sets the number of columns in the columns component to 12 on small screens.
60
+ // - `.md:count-1`: Sets the number of columns in the columns component to 1 on medium screens.
61
+ // - `.md:count-2`: Sets the number of columns in the columns component to 2 on medium screens.
62
+ // - `.md:count-3`: Sets the number of columns in the columns component to 3 on medium screens.
63
+ // - `.md:count-4`: Sets the number of columns in the columns component to 4 on medium screens.
64
+ // - `.md:count-5`: Sets the number of columns in the columns component to 5 on medium screens.
65
+ // - `.md:count-6`: Sets the number of columns in the columns component to 6 on medium screens.
66
+ // - `.md:count-7`: Sets the number of columns in the columns component to 7 on medium screens.
67
+ // - `.md:count-8`: Sets the number of columns in the columns component to 8 on medium screens.
68
+ // - `.md:count-9`: Sets the number of columns in the columns component to 9 on medium screens.
69
+ // - `.md:count-10`: Sets the number of columns in the columns component to 10 on medium screens.
70
+ // - `.md:count-11`: Sets the number of columns in the columns component to 11 on medium screens.
71
+ // - `.md:count-12`: Sets the number of columns in the columns component to 12 on medium screens.
72
+ // - `.lg:count-1`: Sets the number of columns in the columns component to 1 on large screens.
73
+ // - `.lg:count-2`: Sets the number of columns in the columns component to 2 on large screens.
74
+ // - `.lg:count-3`: Sets the number of columns in the columns component to 3 on large screens.
75
+ // - `.lg:count-4`: Sets the number of columns in the columns component to 4 on large screens.
76
+ // - `.lg:count-5`: Sets the number of columns in the columns component to 5 on large screens.
77
+ // - `.lg:count-6`: Sets the number of columns in the columns component to 6 on large screens.
78
+ // - `.lg:count-7`: Sets the number of columns in the columns component to 7 on large screens.
79
+ // - `.lg:count-8`: Sets the number of columns in the columns component to 8 on large screens.
80
+ // - `.lg:count-9`: Sets the number of columns in the columns component to 9 on large screens.
81
+ // - `.lg:count-10`: Sets the number of columns in the columns component to 10 on large screens.
82
+ // - `.lg:count-11`: Sets the number of columns in the columns component to 11 on large screens.
83
+ // - `.lg:count-12`: Sets the number of columns in the columns component to 12 on large screens.
84
+ // - `.xl:count-1`: Sets the number of columns in the columns component to 1 on extra large screens.
85
+ // - `.xl:count-2`: Sets the number of columns in the columns component to 2 on extra large screens.
86
+ // - `.xl:count-3`: Sets the number of columns in the columns component to 3 on extra large screens.
87
+ // - `.xl:count-4`: Sets the number of columns in the columns component to 4 on extra large screens.
88
+ // - `.xl:count-5`: Sets the number of columns in the columns component to 5 on extra large screens.
89
+ // - `.xl:count-6`: Sets the number of columns in the columns component to 6 on extra large screens.
90
+ // - `.xl:count-7`: Sets the number of columns in the columns component to 7 on extra large screens.
91
+ // - `.xl:count-8`: Sets the number of columns in the columns component to 8 on extra large screens.
92
+ // - `.xl:count-9`: Sets the number of columns in the columns component to 9 on extra large screens.
93
+ // - `.xl:count-10`: Sets the number of columns in the columns component to 10 on extra large screens.
94
+ // - `.xl:count-11`: Sets the number of columns in the columns component to 11 on extra large screens.
95
+ // - `.xl:count-12`: Sets the number of columns in the columns component to 12 on extra large screens.
24
96
  // - `.span-1`: Sets the span of a column in the columns component to 1.
25
97
  // - `.span-2`: Sets the span of a column in the columns component to 2.
26
98
  // - `.span-3`: Sets the span of a column in the columns component to 3.
27
99
  // - `.span-4`: Sets the span of a column in the columns component to 4.
28
100
  // - `.span-5`: Sets the span of a column in the columns component to 5.
29
101
  // - `.span-6`: Sets the span of a column in the columns component to 6.
102
+ // - `.span-7`: Sets the span of a column in the columns component to 7.
103
+ // - `.span-8`: Sets the span of a column in the columns component to 8.
104
+ // - `.span-9`: Sets the span of a column in the columns component to 9.
105
+ // - `.span-10`: Sets the span of a column in the columns component to 10.
106
+ // - `.span-11`: Sets the span of a column in the columns component to 11.
107
+ // - `.span-12`: Sets the span of a column in the columns component to 12.
108
+ // - `.xs:span-1`: Sets the span of a column in the columns component to 1 on extra small screens.
109
+ // - `.xs:span-2`: Sets the span of a column in the columns component to 2 on extra small screens.
110
+ // - `.xs:span-3`: Sets the span of a column in the columns component to 3 on extra small screens.
111
+ // - `.xs:span-4`: Sets the span of a column in the columns component to 4 on extra small screens.
112
+ // - `.xs:span-5`: Sets the span of a column in the columns component to 5 on extra small screens.
113
+ // - `.xs:span-6`: Sets the span of a column in the columns component to 6 on extra small screens.
114
+ // - `.xs:span-7`: Sets the span of a column in the columns component to 7 on extra small screens.
115
+ // - `.xs:span-8`: Sets the span of a column in the columns component to 8 on extra small screens.
116
+ // - `.xs:span-9`: Sets the span of a column in the columns component to 9 on extra small screens.
117
+ // - `.xs:span-10`: Sets the span of a column in the columns component to 10 on extra small screens.
118
+ // - `.xs:span-11`: Sets the span of a column in the columns component to 11 on extra small screens.
119
+ // - `.xs:span-12`: Sets the span of a column in the columns component to 12 on extra small screens.
120
+ // - `.sm:span-1`: Sets the span of a column in the columns component to 1 on small screens.
121
+ // - `.sm:span-2`: Sets the span of a column in the columns component to 2 on small screens.
122
+ // - `.sm:span-3`: Sets the span of a column in the columns component to 3 on small screens.
123
+ // - `.sm:span-4`: Sets the span of a column in the columns component to 4 on small screens.
124
+ // - `.sm:span-5`: Sets the span of a column in the columns component to 5 on small screens.
125
+ // - `.sm:span-6`: Sets the span of a column in the columns component to 6 on small screens.
126
+ // - `.sm:span-7`: Sets the span of a column in the columns component to 7 on small screens.
127
+ // - `.sm:span-8`: Sets the span of a column in the columns component to 8 on small screens.
128
+ // - `.sm:span-9`: Sets the span of a column in the columns component to 9 on small screens.
129
+ // - `.sm:span-10`: Sets the span of a column in the columns component to 10 on small screens.
130
+ // - `.sm:span-11`: Sets the span of a column in the columns component to 11 on small screens.
131
+ // - `.sm:span-12`: Sets the span of a column in the columns component to 12 on small screens.
132
+ // - `.md:span-1`: Sets the span of a column in the columns component to 1 on medium screens.
133
+ // - `.md:span-2`: Sets the span of a column in the columns component to 2 on medium screens.
134
+ // - `.md:span-3`: Sets the span of a column in the columns component to 3 on medium screens.
135
+ // - `.md:span-4`: Sets the span of a column in the columns component to 4 on medium screens.
136
+ // - `.md:span-5`: Sets the span of a column in the columns component to 5 on medium screens.
137
+ // - `.md:span-6`: Sets the span of a column in the columns component to 6 on medium screens.
138
+ // - `.md:span-7`: Sets the span of a column in the columns component to 7 on medium screens.
139
+ // - `.md:span-8`: Sets the span of a column in the columns component to 8 on medium screens.
140
+ // - `.md:span-9`: Sets the span of a column in the columns component to 9 on medium screens.
141
+ // - `.md:span-10`: Sets the span of a column in the columns component to 10 on medium screens.
142
+ // - `.md:span-11`: Sets the span of a column in the columns component to 11 on medium screens.
143
+ // - `.md:span-12`: Sets the span of a column in the columns component to 12 on medium screens.
144
+ // - `.lg:span-1`: Sets the span of a column in the columns component to 1 on large screens.
145
+ // - `.lg:span-2`: Sets the span of a column in the columns component to 2 on large screens.
146
+ // - `.lg:span-3`: Sets the span of a column in the columns component to 3 on large screens.
147
+ // - `.lg:span-4`: Sets the span of a column in the columns component to 4 on large screens.
148
+ // - `.lg:span-5`: Sets the span of a column in the columns component to 5 on large screens.
149
+ // - `.lg:span-6`: Sets the span of a column in the columns component to 6 on large screens.
150
+ // - `.lg:span-7`: Sets the span of a column in the columns component to 7 on large screens.
151
+ // - `.lg:span-8`: Sets the span of a column in the columns component to 8 on large screens.
152
+ // - `.lg:span-9`: Sets the span of a column in the columns component to 9 on large screens.
153
+ // - `.lg:span-10`: Sets the span of a column in the columns component to 10 on large screens.
154
+ // - `.lg:span-11`: Sets the span of a column in the columns component to 11 on large screens.
155
+ // - `.lg:span-12`: Sets the span of a column in the columns component to 12 on large screens.
156
+ // - `.xl:span-1`: Sets the span of a column in the columns component to 1 on extra large screens.
157
+ // - `.xl:span-2`: Sets the span of a column in the columns component to 2 on extra large screens.
158
+ // - `.xl:span-3`: Sets the span of a column in the columns component to 3 on extra large screens.
159
+ // - `.xl:span-4`: Sets the span of a column in the columns component to 4 on extra large screens.
160
+ // - `.xl:span-5`: Sets the span of a column in the columns component to 5 on extra large screens.
161
+ // - `.xl:span-6`: Sets the span of a column in the columns component to 6 on extra large screens.
162
+ // - `.xl:span-7`: Sets the span of a column in the columns component to 7 on extra large screens.
163
+ // - `.xl:span-8`: Sets the span of a column in the columns component to 8 on extra large screens.
164
+ // - `.xl:span-9`: Sets the span of a column in the columns component to 9 on extra large screens.
165
+ // - `.xl:span-10`: Sets the span of a column in the columns component to 10 on extra large screens.
166
+ // - `.xl:span-11`: Sets the span of a column in the columns component to 11 on extra large screens.
167
+ // - `.xl:span-12`: Sets the span of a column in the columns component to 12 on extra large screens.
30
168
  //
31
169
  // The following custom properties can be used to customize the columns component:
32
170
  // | Property | Description | Default Value |
@@ -43,28 +181,50 @@
43
181
  // | `--graupl-columns-color` | The text color of the columns component. | `var(--graupl-color)` |
44
182
  //
45
183
  // The following sass variables can be used to customize the generation of the columns component:
46
- // | Variable | Description | Default Value |
47
- // | -------------------------------- | ------------------------------------------------------------------ | ---------------- |
48
- // | `$selector-base` | The base selector for the component. | `"."` |
49
- // | `$modifier-selector-base` | The base selector for component modifiers. | `"."` |
50
- // | `$generate-base-theme-map` | Flag to generate the base theme map. | `true` |
51
- // | `$themeable` | Flag to generate theme modifiers. | `false` |
52
- // | `$force-single-columns` | Flag to enable forced single column layout on small screens. | `true` |
53
- // | `$columns-selector-base` | The base selector for the columns component. | `"."` |
54
- // | `$columns-selector` | The selector for the columns component. | `"columns"` |
55
- // | `$columns-theme-selector-base` | The selector base for columns theme modifiers. | `"."` |
56
- // | `$columns-theme-selector-prefix` | The columns theme modifier selector prefix. | `""` |
57
- // | `$columns-count-selector-base` | The base selector for the count class. | `"."` |
58
- // | `$columns-count-selector-prefix` | The prefix for the count class. | `"count-"` |
59
- // | `$columns-span-selector-base` | The base selector for the span class. | `"."` |
60
- // | `$columns-span-selector-prefix` | The prefix for the span class. | `"span-"` |
61
- // | `$columns-max-width` | The maximum width of each column. | `1fr` |
62
- // | `$columns-count` | The default number of columns. | `3` |
63
- // | `$columns-min-count` | The minimum number of columns used to generate `.count-#` classes. | `1` |
64
- // | `$columns-max-count` | The maximum number of columns used to generate `.count-#` classes. | `6` |
65
- // | `$columns-span` | The default span of each column. | `1` |
66
- // | `$columns-theme-mappings` | Map of properties/shades for columns themes. | `()` |
67
- // | `$columns-theme-map` | Expanded map of properties/colors/shades. | `()` |
184
+ // | Variable | Description | Default Value |
185
+ // | --------------------------------------------- | ---------------------------------------------------------------------- | ---------------- |
186
+ // | `$selector-base` | The base selector for the component. | `"."` |
187
+ // | `$modifier-selector-base` | The base selector for component modifiers. | `"."` |
188
+ // | `$generate-base-theme-map` | Flag to generate the base theme map. | `true` |
189
+ // | `$themeable` | Flag to generate theme modifiers. | `false` |
190
+ // | `$screen-aware` | Enables screen-aware column variants. | `true` |
191
+ // | `$theme-aware` | Enables theme-aware column variants. | `false` |
192
+ // | `$scheme-aware` | Enables scheme-aware column variants. | `false` |
193
+ // | `$state-aware` | Enables state-aware column variants. | `false` |
194
+ // | `$container-aware` | Enables container-aware column variants. | `true` |
195
+ // | `$force-single-columns` | Flag to enable forced single column layout on small screens. | `true` |
196
+ // | `$columns-selector-base` | The base selector for the columns component. | `"."` |
197
+ // | `$columns-selector` | The selector for the columns component. | `"columns"` |
198
+ // | `$columns-theme-selector-base` | The selector base for columns theme modifiers. | `"."` |
199
+ // | `$columns-theme-selector-prefix` | The columns theme modifier selector prefix. | `""` |
200
+ // | `$columns-count-selector-base` | The base selector for the count class. | `"."` |
201
+ // | `$columns-count-selector-prefix` | The prefix for the count class. | `"count-"` |
202
+ // | `$columns-span-selector-base` | The base selector for the span class. | `"."` |
203
+ // | `$columns-span-selector-prefix` | The prefix for the span class. | `"span-"` |
204
+ // | `$columns-fixed-selector-base` | The base selector for the fixed class. | `"."` |
205
+ // | `$columns-fixed-selector` | The selector for the fixed class. | `"fixed"` |
206
+ // | `$columns-screen-aware-selector-prefix` | Prefix to the screen-aware portion of column selectors. | `""` |
207
+ // | `$columns-screen-aware-selector-suffix` | Suffix to the screen-aware portion of column selectors. | `""` |
208
+ // | `$columns-screen-aware-selector-separator` | Separator inserted for screen-aware column selectors. | `"\\:"` |
209
+ // | `$columns-theme-aware-selector-prefix` | Prefix to the theme-aware portion of column selectors. | `""` |
210
+ // | `$columns-theme-aware-selector-suffix` | Suffix to the theme-aware portion of column selectors. | `"-theme"` |
211
+ // | `$columns-theme-aware-selector-separator` | Separator inserted for theme-aware column selectors. | `"\\:"` |
212
+ // | `$columns-scheme-aware-selector-prefix` | Prefix to the scheme-aware portion of column selectors. | `""` |
213
+ // | `$columns-scheme-aware-selector-suffix` | Suffix to the scheme-aware portion of column selectors. | `"-mode"` |
214
+ // | `$columns-scheme-aware-selector-separator` | Separator inserted for scheme-aware column selectors. | `"\\:"` |
215
+ // | `$columns-state-aware-selector-prefix` | Prefix to the state-aware portion of column selectors. | `""` |
216
+ // | `$columns-state-aware-selector-suffix` | Suffix to the state-aware portion of column selectors. | `""` |
217
+ // | `$columns-state-aware-selector-separator` | Separator inserted for state-aware column selectors. | `"\\:"` |
218
+ // | `$columns-container-aware-selector-prefix` | Prefix to the container-aware portion of column selectors. | `"cq\\:"` |
219
+ // | `$columns-container-aware-selector-suffix` | Suffix to the container-aware portion of column selectors. | `""` |
220
+ // | `$columns-container-aware-selector-separator` | Separator inserted for container-aware column selectors. | `"\\:"` |
221
+ // | `$columns-max-width` | The maximum width of each column. | `1fr` |
222
+ // | `$columns-count` | The default number of columns. | `3` |
223
+ // | `$columns-min-count` | The minimum number of columns used to generate `.count-#` classes. | `1` |
224
+ // | `$columns-max-count` | The maximum number of columns used to generate `.count-#` classes. | `12` |
225
+ // | `$columns-span` | The default span of each column. | `1` |
226
+ // | `$columns-theme-mappings` | Map of properties/shades for columns themes. | `()` |
227
+ // | `$columns-theme-map` | Expanded map of properties/colors/shades. | `()` |
68
228
  //
69
229
  // @example
70
230
  // <div class="columns">
@@ -86,6 +246,33 @@
86
246
  @use "../../mixins/layer" as *;
87
247
  @use "../../mixins/container";
88
248
  @use "../../mixins/theme";
249
+ @use "../../mixins/utility";
250
+ @use "sass:map";
251
+ @use "sass:list";
252
+
253
+ $columns-count-map: ();
254
+ $columns-span-map: ();
255
+
256
+ @for $i from defaults.$columns-min-count through defaults.$columns-max-count {
257
+ /* stylelint-disable */
258
+ $columns-count-map: map.merge(
259
+ $columns-count-map,
260
+ (
261
+ #{defaults.$columns-count-selector-prefix}#{$i}: (
262
+ --#{root-defaults.$prefix}columns-count: #{$i}
263
+ )
264
+ )
265
+ );
266
+ $columns-span-map: map.merge(
267
+ $columns-span-map,
268
+ (
269
+ #{defaults.$columns-span-selector-prefix}#{$i}: (
270
+ --#{root-defaults.$prefix}columns-span: #{$i}
271
+ )
272
+ )
273
+ );
274
+ /* stylelint-enable */
275
+ }
89
276
 
90
277
  @include layer(layout) {
91
278
  // .columns
@@ -105,27 +292,151 @@
105
292
  #{defaults.$columns-selector-base}#{defaults.$columns-selector} {
106
293
  grid-template-columns: subgrid;
107
294
  }
108
- }
109
295
 
110
- @for $i from defaults.$columns-min-count through defaults.$columns-max-count {
111
- // .count-#{$i}
112
- #{defaults.$columns-count-selector-base}#{defaults.$columns-count-selector-prefix}#{$i} {
113
- --#{root-defaults.$prefix}columns-count: #{$i};
296
+ @include utility.generate(
297
+ $map: (
298
+ "#{defaults.$columns-fixed-selector}": (
299
+ --graupl-columns-max-width: #{$columns-min-width},
300
+ ),
301
+ ),
302
+ $selector-base: "&#{defaults.$columns-fixed-selector-base}",
303
+ $selector-prefix: "",
304
+ $selector-suffix: "",
305
+ $screen-aware: defaults.$screen-aware,
306
+ $screen-aware-selector-prefix:
307
+ defaults.$columns-screen-aware-selector-prefix,
308
+ $screen-aware-selector-suffix:
309
+ defaults.$columns-screen-aware-selector-suffix,
310
+ $screen-aware-selector-separator:
311
+ defaults.$columns-screen-aware-selector-separator,
312
+ $theme-aware: defaults.$theme-aware,
313
+ $theme-aware-selector-prefix:
314
+ defaults.$columns-theme-aware-selector-prefix,
315
+ $theme-aware-selector-suffix:
316
+ defaults.$columns-theme-aware-selector-suffix,
317
+ $theme-aware-selector-separator:
318
+ defaults.$columns-theme-aware-selector-separator,
319
+ $scheme-aware: defaults.$scheme-aware,
320
+ $scheme-aware-selector-prefix:
321
+ defaults.$columns-scheme-aware-selector-prefix,
322
+ $scheme-aware-selector-suffix:
323
+ defaults.$columns-scheme-aware-selector-suffix,
324
+ $scheme-aware-selector-separator:
325
+ defaults.$columns-scheme-aware-selector-separator,
326
+ $state-aware: defaults.$state-aware,
327
+ $state-aware-selector-prefix:
328
+ defaults.$columns-state-aware-selector-prefix,
329
+ $state-aware-selector-suffix:
330
+ defaults.$columns-state-aware-selector-suffix,
331
+ $state-aware-selector-separator:
332
+ defaults.$columns-state-aware-selector-separator,
333
+ $container-aware: defaults.$container-aware,
334
+ $container-aware-selector-prefix:
335
+ defaults.$columns-container-aware-selector-prefix,
336
+ $container-aware-selector-suffix:
337
+ defaults.$columns-container-aware-selector-suffix,
338
+ $container-aware-selector-separator:
339
+ defaults.$columns-container-aware-selector-separator,
340
+ $important: false
341
+ );
342
+
343
+ @include utility.generate(
344
+ $map: $columns-count-map,
345
+ $selector-base: "&#{defaults.$columns-count-selector-base}",
346
+ $selector-prefix: "",
347
+ $selector-suffix: "",
348
+ $screen-aware: defaults.$screen-aware,
349
+ $screen-aware-selector-prefix:
350
+ defaults.$columns-screen-aware-selector-prefix,
351
+ $screen-aware-selector-suffix:
352
+ defaults.$columns-screen-aware-selector-suffix,
353
+ $screen-aware-selector-separator:
354
+ defaults.$columns-screen-aware-selector-separator,
355
+ $theme-aware: defaults.$theme-aware,
356
+ $theme-aware-selector-prefix:
357
+ defaults.$columns-theme-aware-selector-prefix,
358
+ $theme-aware-selector-suffix:
359
+ defaults.$columns-theme-aware-selector-suffix,
360
+ $theme-aware-selector-separator:
361
+ defaults.$columns-theme-aware-selector-separator,
362
+ $scheme-aware: defaults.$scheme-aware,
363
+ $scheme-aware-selector-prefix:
364
+ defaults.$columns-scheme-aware-selector-prefix,
365
+ $scheme-aware-selector-suffix:
366
+ defaults.$columns-scheme-aware-selector-suffix,
367
+ $scheme-aware-selector-separator:
368
+ defaults.$columns-scheme-aware-selector-separator,
369
+ $state-aware: defaults.$state-aware,
370
+ $state-aware-selector-prefix:
371
+ defaults.$columns-state-aware-selector-prefix,
372
+ $state-aware-selector-suffix:
373
+ defaults.$columns-state-aware-selector-suffix,
374
+ $state-aware-selector-separator:
375
+ defaults.$columns-state-aware-selector-separator,
376
+ $container-aware: defaults.$container-aware,
377
+ $container-aware-selector-prefix:
378
+ defaults.$columns-container-aware-selector-prefix,
379
+ $container-aware-selector-suffix:
380
+ defaults.$columns-container-aware-selector-suffix,
381
+ $container-aware-selector-separator:
382
+ defaults.$columns-container-aware-selector-separator,
383
+ $important: false
384
+ )
385
+ using($selector, $properties, $responsive-type, $responsive-name) {
386
+ $count-classes: map.keys($columns-count-map);
387
+ $i: list.index($count-classes, $selector);
114
388
 
115
- // For span values bigger than the actual column count, set them to the
116
389
  // maximum column count so they don't break the layout.
117
390
  @for $j from $i + 1 through defaults.$columns-max-count {
118
- // .span-#{$j}
119
- #{defaults.$columns-span-selector-base}#{defaults.$columns-span-selector-prefix}#{$j} {
391
+ // > .span-#{$j}
392
+ > #{defaults.$columns-span-selector-base}#{defaults.$columns-span-selector-prefix}#{$j} {
120
393
  --#{root-defaults.$prefix}columns-span: #{$i};
121
394
  }
122
395
  }
123
396
  }
124
397
 
125
- // .span-#{$i}
126
- #{defaults.$columns-span-selector-base}#{defaults.$columns-span-selector-prefix}#{$i} {
127
- --#{root-defaults.$prefix}columns-span: #{$i};
128
- }
398
+ @include utility.generate(
399
+ $map: $columns-span-map,
400
+ $selector-base: "#{defaults.$columns-span-selector-base}",
401
+ $selector-prefix: "",
402
+ $selector-suffix: "",
403
+ $screen-aware: defaults.$screen-aware,
404
+ $screen-aware-selector-prefix:
405
+ defaults.$columns-screen-aware-selector-prefix,
406
+ $screen-aware-selector-suffix:
407
+ defaults.$columns-screen-aware-selector-suffix,
408
+ $screen-aware-selector-separator:
409
+ defaults.$columns-screen-aware-selector-separator,
410
+ $theme-aware: defaults.$theme-aware,
411
+ $theme-aware-selector-prefix:
412
+ defaults.$columns-theme-aware-selector-prefix,
413
+ $theme-aware-selector-suffix:
414
+ defaults.$columns-theme-aware-selector-suffix,
415
+ $theme-aware-selector-separator:
416
+ defaults.$columns-theme-aware-selector-separator,
417
+ $scheme-aware: defaults.$scheme-aware,
418
+ $scheme-aware-selector-prefix:
419
+ defaults.$columns-scheme-aware-selector-prefix,
420
+ $scheme-aware-selector-suffix:
421
+ defaults.$columns-scheme-aware-selector-suffix,
422
+ $scheme-aware-selector-separator:
423
+ defaults.$columns-scheme-aware-selector-separator,
424
+ $state-aware: defaults.$state-aware,
425
+ $state-aware-selector-prefix:
426
+ defaults.$columns-state-aware-selector-prefix,
427
+ $state-aware-selector-suffix:
428
+ defaults.$columns-state-aware-selector-suffix,
429
+ $state-aware-selector-separator:
430
+ defaults.$columns-state-aware-selector-separator,
431
+ $container-aware: defaults.$container-aware,
432
+ $container-aware-selector-prefix:
433
+ defaults.$columns-container-aware-selector-prefix,
434
+ $container-aware-selector-suffix:
435
+ defaults.$columns-container-aware-selector-suffix,
436
+ $container-aware-selector-separator:
437
+ defaults.$columns-container-aware-selector-separator,
438
+ $important: false
439
+ );
129
440
  }
130
441
 
131
442
  // Disable columns on small screens to avoid horizontal bleeding.
@@ -144,7 +455,7 @@
144
455
  from defaults.$columns-min-count
145
456
  through defaults.$columns-max-count
146
457
  {
147
- // .span-#{$i}
458
+ // > .span-#{$i}
148
459
  #{defaults.$columns-span-selector-base}#{defaults.$columns-span-selector-prefix}#{$i} {
149
460
  --#{root-defaults.$prefix}columns-span: 1;
150
461
  }
@@ -45,8 +45,8 @@ $flex-columns-container-aware-selector-suffix: root-defaults.$container-aware-se
45
45
  $flex-columns-container-aware-selector-separator: root-defaults.$container-aware-selector-separator !default;
46
46
 
47
47
  // Flex columns properties.
48
- $flex-columns-min-count: 1 !default;
49
- $flex-columns-max-count: 12 !default;
48
+ $flex-columns-min-count: root-defaults.$column-layout-min-count !default;
49
+ $flex-columns-max-count: root-defaults.$column-layout-max-count !default;
50
50
  $flex-columns-size: auto !default;
51
51
  $flex-columns-max-width: unset !default;
52
52
  $flex-columns-container-type: "inline-size" !default;