@birdycom/omniacss 0.0.0-stage → 0.11.1
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/LICENSE +21 -0
- package/README.md +44 -3
- package/dist/oc-colors.css +4429 -0
- package/dist/oc-theme.css +69 -0
- package/dist/omnia.css +465436 -0
- package/dist/omnia.min.css +2 -0
- package/dist/omnia.starter.css +13461 -0
- package/dist/omnia.starter.min.css +1 -0
- package/dist/tokens/omnia.dtcg.json +1496 -0
- package/dist/tokens/omnia.tokens.json +580 -0
- package/dist/tokens/omnia_tokens.py +189 -0
- package/package.json +63 -6
- package/scss/base/_reset.scss +88 -0
- package/scss/config/omniacss.config.scss +114 -0
- package/scss/config/omniacss.fonts.scss +34 -0
- package/scss/functions/_functions.scss +407 -0
- package/scss/json/html-colors.json +1998 -0
- package/scss/json/omnia-colors.json +500 -0
- package/scss/json/ral-colors.json +3430 -0
- package/scss/layout/_media_query.scss +18 -0
- package/scss/omnia_colors.scss +7 -0
- package/scss/omnia_main.scss +143 -0
- package/scss/profiles/omnia_main.hsl.scss +12 -0
- package/scss/profiles/omnia_main.oklab.scss +12 -0
- package/scss/profiles/omnia_main.oklch.scss +12 -0
- package/scss/utilities/_accessibility.scss +42 -0
- package/scss/utilities/_alignment.scss +861 -0
- package/scss/utilities/_anchor_positioning.scss +65 -0
- package/scss/utilities/_animation_properties.scss +143 -0
- package/scss/utilities/_aspect.scss +73 -0
- package/scss/utilities/_backgrounds.scss +49 -0
- package/scss/utilities/_borders_extended.scss +97 -0
- package/scss/utilities/_borders_outlines.scss +161 -0
- package/scss/utilities/_clamp.scss +111 -0
- package/scss/utilities/_colors_html.scss +341 -0
- package/scss/utilities/_colors_mix.scss +84 -0
- package/scss/utilities/_colors_omnia.scss +315 -0
- package/scss/utilities/_colors_ral.scss +151 -0
- package/scss/utilities/_colors_tokens.scss +87 -0
- package/scss/utilities/_container.scss +58 -0
- package/scss/utilities/_containment.scss +82 -0
- package/scss/utilities/_corner_shape.scss +30 -0
- package/scss/utilities/_css_functions.scss +34 -0
- package/scss/utilities/_dark_mode.scss +117 -0
- package/scss/utilities/_display.scss +58 -0
- package/scss/utilities/_drop_shadow_colors.scss +26 -0
- package/scss/utilities/_effects.scss +50 -0
- package/scss/utilities/_effects_advanced.scss +102 -0
- package/scss/utilities/_experimental_css.scss +149 -0
- package/scss/utilities/_filters.scss +89 -0
- package/scss/utilities/_flexbox.scss +318 -0
- package/scss/utilities/_font_variants.scss +139 -0
- package/scss/utilities/_fonts.scss +276 -0
- package/scss/utilities/_gap.scss +104 -0
- package/scss/utilities/_gradient_stops.scss +48 -0
- package/scss/utilities/_gradients.scss +99 -0
- package/scss/utilities/_grid.scss +673 -0
- package/scss/utilities/_index.scss +22 -0
- package/scss/utilities/_interactivity.scss +198 -0
- package/scss/utilities/_layering.scss +24 -0
- package/scss/utilities/_layout_extras.scss +171 -0
- package/scss/utilities/_layout_flow.scss +210 -0
- package/scss/utilities/_mask_extras.scss +62 -0
- package/scss/utilities/_motion_transforms.scss +167 -0
- package/scss/utilities/_overflow.scss +41 -0
- package/scss/utilities/_position.scss +49 -0
- package/scss/utilities/_responsive.scss +272 -0
- package/scss/utilities/_scroll_animations.scss +80 -0
- package/scss/utilities/_scroll_spacing.scss +33 -0
- package/scss/utilities/_scrollbar.scss +50 -0
- package/scss/utilities/_shadow_tokens.scss +21 -0
- package/scss/utilities/_shapes.scss +72 -0
- package/scss/utilities/_sizing.scss +458 -0
- package/scss/utilities/_sizing_logical.scss +99 -0
- package/scss/utilities/_space_divide.scss +85 -0
- package/scss/utilities/_spacing_margin.scss +199 -0
- package/scss/utilities/_spacing_padding.scss +195 -0
- package/scss/utilities/_starting_style.scss +53 -0
- package/scss/utilities/_state_variants.scss +196 -0
- package/scss/utilities/_svg.scss +100 -0
- package/scss/utilities/_table.scss +46 -0
- package/scss/utilities/_table_advanced.scss +19 -0
- package/scss/utilities/_text.scss +1331 -0
- package/scss/utilities/_transforms_3d.scss +76 -0
- package/scss/utilities/_typography_advanced.scss +124 -0
- package/scss/utilities/_typography_modern.scss +83 -0
- package/scss/utilities/_view_transitions.scss +64 -0
- package/scss/utilities/_writing_modes.scss +72 -0
- package/scss/variables/_color_tone.scss +39 -0
- package/scss/variables/_hulp.scss +108 -0
- package/scss/variables/_mixins.scss +40 -0
- package/scss/variables/_modifiers.scss +32 -0
- package/scss/variables/_variables.scss +302 -0
- package/scss/variables/_variables_colors_html.scss +2019 -0
- package/scss/variables/_variables_colors_omnia.scss +465 -0
- package/scss/variables/_variables_colors_ral.scss +3472 -0
- package/scss/variables/_variables_effects.scss +109 -0
- package/scss/variables/_variables_flex_grid.scss +427 -0
- package/scss/variables/_variables_layout.scss +591 -0
- package/scss/variables/_variables_typography.scss +550 -0
- package/src/engine.mjs +258 -0
- package/src/postcss.mjs +43 -0
- package/src/starter-classes.mjs +124 -0
- package/src/tokens.mjs +377 -0
- package/src/variants.mjs +278 -0
- package/tokens/semantic.json +80 -0
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
// SCSS Document
|
|
2
|
+
// File: src/scss/utilities/_grid.scss
|
|
3
|
+
// Description: CSS Grid properties
|
|
4
|
+
// Copyright: 2021-2022 Birdycom
|
|
5
|
+
// Autor: Serge Cools
|
|
6
|
+
// Version: 0.2.0
|
|
7
|
+
// Framework: OmniaCSS
|
|
8
|
+
// Properties: display
|
|
9
|
+
// Values: grid
|
|
10
|
+
|
|
11
|
+
@use '../utilities/' as *;
|
|
12
|
+
|
|
13
|
+
/* The Grid properties */
|
|
14
|
+
|
|
15
|
+
///
|
|
16
|
+
/// This code is a Sass (CSS preprocessor) loop that iterates over a list called $displaygrid.
|
|
17
|
+
/// For each item (which is represented by the variable $display-prop) in the list,
|
|
18
|
+
/// it creates a CSS class with the name of the item (using Sass's interpolation syntax),
|
|
19
|
+
/// and sets the display property to the value of $display-prop.
|
|
20
|
+
///
|
|
21
|
+
/// The resulting CSS code would output a series of classes (one for each item in $displaygrid) that look like this:
|
|
22
|
+
///
|
|
23
|
+
/// @group Grid
|
|
24
|
+
/// @name grid
|
|
25
|
+
/// @link src/scss/utilities/_grid.scss
|
|
26
|
+
/// @since 1.0.0
|
|
27
|
+
/// @author Serge Cools
|
|
28
|
+
///
|
|
29
|
+
/// Applies to: all elements
|
|
30
|
+
///
|
|
31
|
+
/// @require $displaygrid
|
|
32
|
+
/// @example scss - grid class
|
|
33
|
+
/// @each $display-prop in $displaygrid {
|
|
34
|
+
/// .#{$display-prop}{
|
|
35
|
+
/// display: $display-prop
|
|
36
|
+
/// }
|
|
37
|
+
/// }
|
|
38
|
+
/// @example html - use grid class
|
|
39
|
+
/// <div class="grid">
|
|
40
|
+
///
|
|
41
|
+
/// </div>
|
|
42
|
+
@each $display-prop in $displaygrid {
|
|
43
|
+
.#{$display-prop}{
|
|
44
|
+
|
|
45
|
+
display: $display-prop
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* grid column */
|
|
51
|
+
///
|
|
52
|
+
/// The code is written in SCSS syntax. It includes a loop where a value is initialized to i, which increases by 1 in each iteration of the loop, from 1 until 12.
|
|
53
|
+
///
|
|
54
|
+
/// Within the loop, a class selector .grid-cols is defined and interpolated with the current loop index #{$i},
|
|
55
|
+
/// creating a new class selector for each iteration, for example .grid-cols-1, .grid-cols-2, etc.
|
|
56
|
+
///
|
|
57
|
+
/// These new class selectors apply a grid-template-columns property with a value of repeat(#{$i}, minmax(0, 1fr));.
|
|
58
|
+
/// This creates a grid layout with a dynamic number of columns based on the value of i.
|
|
59
|
+
/// The minmax(0, 1fr) function specifies that the column should be at minimum 0 pixels wide and at maximum 1 fraction unit wide.
|
|
60
|
+
///
|
|
61
|
+
/// Finally, outside the loop, a separate .grid-cols-none class selector is defined which sets the grid-template-columns property to none,
|
|
62
|
+
/// effectively removing any defined column layout for elements with this class.
|
|
63
|
+
///
|
|
64
|
+
/// @group Gridtemplatecolumns
|
|
65
|
+
/// @name grid_template_columns
|
|
66
|
+
/// @link src/scss/utilities/_grid.scss
|
|
67
|
+
/// @since 1.0.0
|
|
68
|
+
/// @author Serge Cools
|
|
69
|
+
///
|
|
70
|
+
/// Applies to: multi-column elements, flex containers, grid containers
|
|
71
|
+
///
|
|
72
|
+
/// @example scss - grid template columns class
|
|
73
|
+
/// @for $i from 1 through 12 {
|
|
74
|
+
/// .grid-cols {
|
|
75
|
+
/// &-#{$i} {
|
|
76
|
+
/// grid-template-columns: repeat(#{$i}, minmax(0, 1fr));
|
|
77
|
+
/// }
|
|
78
|
+
/// }
|
|
79
|
+
/// }
|
|
80
|
+
/// .grid-cols-none {
|
|
81
|
+
/// grid-template-columns: none;
|
|
82
|
+
/// }
|
|
83
|
+
/// @example html - use gap class
|
|
84
|
+
/// <div class="grid grid-cols-4 gap-4 font-mono text-white text-sm text-center font-bold leading-6 bg-stripes-fuchsia rounded-lg">
|
|
85
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">01</div>
|
|
86
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">02</div>
|
|
87
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">03</div>
|
|
88
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">04</div>
|
|
89
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">05</div>
|
|
90
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">06</div>
|
|
91
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">07</div>
|
|
92
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">08</div>
|
|
93
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-deeppink">09</div>
|
|
94
|
+
/// </div>
|
|
95
|
+
//
|
|
96
|
+
@for $i from 1 through 12 {
|
|
97
|
+
|
|
98
|
+
.grid-cols {
|
|
99
|
+
|
|
100
|
+
&-#{$i} {
|
|
101
|
+
grid-template-columns: repeat(#{$i}, minmax(0, 1fr));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
.grid-cols-none {
|
|
106
|
+
|
|
107
|
+
grid-template-columns: none;
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
///
|
|
114
|
+
/// This code is written in Sass, a preprocessor scripting language that compiles into CSS.
|
|
115
|
+
///
|
|
116
|
+
/// The code is creating a loop using the "@for" directive in Sass. It is iterating from 1 through 6 using the variable $i.
|
|
117
|
+
///
|
|
118
|
+
/// Within the loop, a class selector ".grid-rows" is defined with a nested selector "-#{$i}",
|
|
119
|
+
/// which creates classes named ".grid-rows-1", ".grid-rows-2", etc., depending on the iteration.
|
|
120
|
+
///
|
|
121
|
+
/// Each nested selector sets the "grid-template-rows" property of the grid to follow a pattern of repeated rows using "repeat()" with
|
|
122
|
+
/// the number of repetitions being equal to the iteration number, "#{$i}", and "minmax()" with a minimum size of 0 and a maximum size of 1 fraction unit.
|
|
123
|
+
///
|
|
124
|
+
/// Finally, there is a static class selector ".grid-rows-none" that sets the grid-template-rows property to "none".
|
|
125
|
+
///
|
|
126
|
+
/// @group Gridcolumn
|
|
127
|
+
/// @name grid_column
|
|
128
|
+
/// @link src/scss/utilities/_grid.scss
|
|
129
|
+
/// @since 1.0.0
|
|
130
|
+
/// @author Serge Cools
|
|
131
|
+
///
|
|
132
|
+
/// Applies to: multi-column elements, flex containers, grid containers
|
|
133
|
+
///
|
|
134
|
+
/// @example scss - grid column class
|
|
135
|
+
/// @for $i from 1 through 12 {
|
|
136
|
+
/// .grid-col {
|
|
137
|
+
/// &-#{$i} {
|
|
138
|
+
/// grid-column: span #{$i} / span #{$i} ;
|
|
139
|
+
/// }
|
|
140
|
+
/// }
|
|
141
|
+
/// }
|
|
142
|
+
/// .grid-col-auto {
|
|
143
|
+
/// grid-column: auto;
|
|
144
|
+
/// }
|
|
145
|
+
/// .grid-col-full {
|
|
146
|
+
/// grid-column: 1 / -1;
|
|
147
|
+
/// }
|
|
148
|
+
/// @example html - use gap class
|
|
149
|
+
/// <div class="grid grid-cols-3 gap-4 font-mono text-white text-sm text-center font-bold leading-6">
|
|
150
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">01</div>
|
|
151
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">02</div>
|
|
152
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">03</div>
|
|
153
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo grid-col-2">04</div>
|
|
154
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">05</div>
|
|
155
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">06</div>
|
|
156
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo grid-col-2">07</div>
|
|
157
|
+
/// </div>
|
|
158
|
+
//
|
|
159
|
+
@for $i from 1 through 12 {
|
|
160
|
+
|
|
161
|
+
.grid-col {
|
|
162
|
+
|
|
163
|
+
&-#{$i} {
|
|
164
|
+
grid-column: span #{$i} / span #{$i} ;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
.grid-col-auto {
|
|
169
|
+
|
|
170
|
+
grid-column: auto;
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
.grid-col-full {
|
|
174
|
+
|
|
175
|
+
grid-column: 1 / -1;
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
///
|
|
180
|
+
/// This code is written in Sass, a preprocessor scripting language that compiles into CSS.
|
|
181
|
+
///
|
|
182
|
+
/// The code is creating a loop using the "@for" directive in Sass. It is iterating from 1 through 6 using the variable $i.
|
|
183
|
+
///
|
|
184
|
+
/// Within the loop, a class selector ".grid-rows" is defined with a nested selector "-#{$i}",
|
|
185
|
+
/// which creates classes named ".grid-rows-1", ".grid-rows-2", etc., depending on the iteration.
|
|
186
|
+
///
|
|
187
|
+
/// Each nested selector sets the "grid-template-rows" property of the grid to follow a pattern of repeated rows using "repeat()" with
|
|
188
|
+
/// the number of repetitions being equal to the iteration number, "#{$i}", and "minmax()" with a minimum size of 0 and a maximum size of 1 fraction unit.
|
|
189
|
+
///
|
|
190
|
+
/// Finally, there is a static class selector ".grid-rows-none" that sets the grid-template-rows property to "none".
|
|
191
|
+
///
|
|
192
|
+
/// @group Gridcolumnstart
|
|
193
|
+
/// @name grid_column_start
|
|
194
|
+
/// @link src/scss/utilities/_grid.scss
|
|
195
|
+
/// @since 1.0.0
|
|
196
|
+
/// @author Serge Cools
|
|
197
|
+
///
|
|
198
|
+
/// Applies to: multi-column elements, flex containers, grid containers
|
|
199
|
+
///
|
|
200
|
+
/// @example scss - grid column start class
|
|
201
|
+
/// @for $i from 1 through 13 {
|
|
202
|
+
/// .grid-col-start {
|
|
203
|
+
/// &-#{$i} {
|
|
204
|
+
/// grid-column-start: #{$i} ;
|
|
205
|
+
/// }
|
|
206
|
+
/// }
|
|
207
|
+
/// }
|
|
208
|
+
/// .grid-col-start-auto {
|
|
209
|
+
/// grid-column-start: auto;
|
|
210
|
+
/// }
|
|
211
|
+
/// @example html - use gap class
|
|
212
|
+
/// <div class="grid grid-cols-3 gap-4 font-mono text-white text-sm text-center font-bold leading-6">
|
|
213
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">01</div>
|
|
214
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">02</div>
|
|
215
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">03</div>
|
|
216
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo col-span-2">04</div>
|
|
217
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">05</div>
|
|
218
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">06</div>
|
|
219
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo col-span-2">07</div>
|
|
220
|
+
/// </div>
|
|
221
|
+
//
|
|
222
|
+
@for $i from 1 through 13 {
|
|
223
|
+
|
|
224
|
+
.grid-col-start {
|
|
225
|
+
|
|
226
|
+
&-#{$i} {
|
|
227
|
+
grid-column-start: #{$i} ;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
.grid-col-start-auto {
|
|
232
|
+
|
|
233
|
+
grid-column-start: auto;
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
///
|
|
238
|
+
/// This code is written in Sass, a preprocessor scripting language that compiles into CSS.
|
|
239
|
+
///
|
|
240
|
+
/// The code is creating a loop using the "@for" directive in Sass. It is iterating from 1 through 6 using the variable $i.
|
|
241
|
+
///
|
|
242
|
+
/// Within the loop, a class selector ".grid-rows" is defined with a nested selector "-#{$i}",
|
|
243
|
+
/// which creates classes named ".grid-rows-1", ".grid-rows-2", etc., depending on the iteration.
|
|
244
|
+
///
|
|
245
|
+
/// Each nested selector sets the "grid-template-rows" property of the grid to follow a pattern of repeated rows using "repeat()" with
|
|
246
|
+
/// the number of repetitions being equal to the iteration number, "#{$i}", and "minmax()" with a minimum size of 0 and a maximum size of 1 fraction unit.
|
|
247
|
+
///
|
|
248
|
+
/// Finally, there is a static class selector ".grid-rows-none" that sets the grid-template-rows property to "none".
|
|
249
|
+
///
|
|
250
|
+
/// @group Gridcolumnend
|
|
251
|
+
/// @name grid_column_end
|
|
252
|
+
/// @link src/scss/utilities/_grid.scss
|
|
253
|
+
/// @since 1.0.0
|
|
254
|
+
/// @author Serge Cools
|
|
255
|
+
///
|
|
256
|
+
/// Applies to: multi-column elements, flex containers, grid containers
|
|
257
|
+
///
|
|
258
|
+
/// @example scss - grid column end class
|
|
259
|
+
/// @for $i from 1 through 13 {
|
|
260
|
+
/// .grid-col-end {
|
|
261
|
+
/// &-#{$i} {
|
|
262
|
+
/// grid-column-end: #{$i} ;
|
|
263
|
+
/// }
|
|
264
|
+
/// }
|
|
265
|
+
/// }
|
|
266
|
+
/// .grid-col-end-auto {
|
|
267
|
+
/// grid-column-end: auto;
|
|
268
|
+
/// }
|
|
269
|
+
/// @example html - use gap class
|
|
270
|
+
/// <div class="grid grid-cols-6 gap-4 font-mono text-white text-sm text-center font-bold leading-6">
|
|
271
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
272
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-start-2 grid-col-4">01</div>
|
|
273
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
274
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-start-1 grid-col-end-3">02</div>
|
|
275
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
276
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
277
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-end-7 grid-col-2">03</div>
|
|
278
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-start-1 grid-col-end-7">04</div>
|
|
279
|
+
/// </div>
|
|
280
|
+
//
|
|
281
|
+
@for $i from 1 through 13 {
|
|
282
|
+
|
|
283
|
+
.grid-col-end {
|
|
284
|
+
|
|
285
|
+
&-#{$i} {
|
|
286
|
+
grid-column-end: #{$i} ;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
.grid-col-end-auto {
|
|
291
|
+
|
|
292
|
+
grid-column-end: auto;
|
|
293
|
+
|
|
294
|
+
}
|
|
295
|
+
/* Grid Row */
|
|
296
|
+
///
|
|
297
|
+
/// This code is written in Sass, a preprocessor scripting language that compiles into CSS.
|
|
298
|
+
///
|
|
299
|
+
/// The code is creating a loop using the "@for" directive in Sass. It is iterating from 1 through 6 using the variable $i.
|
|
300
|
+
///
|
|
301
|
+
/// Within the loop, a class selector ".grid-rows" is defined with a nested selector "-#{$i}",
|
|
302
|
+
/// which creates classes named ".grid-rows-1", ".grid-rows-2", etc., depending on the iteration.
|
|
303
|
+
///
|
|
304
|
+
/// Each nested selector sets the "grid-template-rows" property of the grid to follow a pattern of repeated rows using "repeat()" with
|
|
305
|
+
/// the number of repetitions being equal to the iteration number, "#{$i}", and "minmax()" with a minimum size of 0 and a maximum size of 1 fraction unit.
|
|
306
|
+
///
|
|
307
|
+
/// Finally, there is a static class selector ".grid-rows-none" that sets the grid-template-rows property to "none".
|
|
308
|
+
///
|
|
309
|
+
/// @group Gridrow
|
|
310
|
+
/// @name grid_row
|
|
311
|
+
/// @link src/scss/utilities/_grid.scss
|
|
312
|
+
/// @since 1.0.0
|
|
313
|
+
/// @author Serge Cools
|
|
314
|
+
///
|
|
315
|
+
/// Applies to: multi-row elements, flex containers, grid containers
|
|
316
|
+
///
|
|
317
|
+
/// @example scss - grid row class
|
|
318
|
+
/// @for $i from 1 through 6 {
|
|
319
|
+
/// .grid-row {
|
|
320
|
+
/// &-#{$i} {
|
|
321
|
+
/// grid-row: span #{$i} / span #{$i} ;
|
|
322
|
+
/// }
|
|
323
|
+
/// }
|
|
324
|
+
/// }
|
|
325
|
+
/// .grid-row-auto {
|
|
326
|
+
/// grid-row: auto;
|
|
327
|
+
/// }
|
|
328
|
+
/// .grid-row-full {
|
|
329
|
+
/// grid-row: 1 / -1;
|
|
330
|
+
/// }
|
|
331
|
+
/// @example html - use gap class
|
|
332
|
+
/// <div class="grid grid-cols-3 gap-4 font-mono text-white text-sm text-center font-bold leading-6">
|
|
333
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">01</div>
|
|
334
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">02</div>
|
|
335
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">03</div>
|
|
336
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo grid-col-2">04</div>
|
|
337
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">05</div>
|
|
338
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">06</div>
|
|
339
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo grid-col-2">07</div>
|
|
340
|
+
/// </div>
|
|
341
|
+
//
|
|
342
|
+
@for $i from 1 through 6 {
|
|
343
|
+
|
|
344
|
+
.grid-row {
|
|
345
|
+
|
|
346
|
+
&-#{$i} {
|
|
347
|
+
grid-row: span #{$i} / span #{$i} ;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
.grid-row-auto {
|
|
352
|
+
|
|
353
|
+
grid-row: auto;
|
|
354
|
+
|
|
355
|
+
}
|
|
356
|
+
.grid-row-full {
|
|
357
|
+
|
|
358
|
+
grid-row: 1 / -1;
|
|
359
|
+
|
|
360
|
+
}
|
|
361
|
+
///
|
|
362
|
+
/// This code is written in Sass, a preprocessor scripting language that compiles into CSS.
|
|
363
|
+
///
|
|
364
|
+
/// The code is creating a loop using the "@for" directive in Sass. It is iterating from 1 through 6 using the variable $i.
|
|
365
|
+
///
|
|
366
|
+
/// Within the loop, a class selector ".grid-rows" is defined with a nested selector "-#{$i}",
|
|
367
|
+
/// which creates classes named ".grid-rows-1", ".grid-rows-2", etc., depending on the iteration.
|
|
368
|
+
///
|
|
369
|
+
/// Each nested selector sets the "grid-template-rows" property of the grid to follow a pattern of repeated rows using "repeat()" with
|
|
370
|
+
/// the number of repetitions being equal to the iteration number, "#{$i}", and "minmax()" with a minimum size of 0 and a maximum size of 1 fraction unit.
|
|
371
|
+
///
|
|
372
|
+
/// Finally, there is a static class selector ".grid-rows-none" that sets the grid-template-rows property to "none".
|
|
373
|
+
///
|
|
374
|
+
/// @group Gridtemplaterows
|
|
375
|
+
/// @name grid_template_rows
|
|
376
|
+
/// @link src/scss/utilities/_grid.scss
|
|
377
|
+
/// @since 1.0.0
|
|
378
|
+
/// @author Serge Cools
|
|
379
|
+
///
|
|
380
|
+
/// Applies to: multi-column elements, flex containers, grid containers
|
|
381
|
+
///
|
|
382
|
+
/// @example scss - grid template rows class
|
|
383
|
+
/// @for $i from 1 through 6 {
|
|
384
|
+
/// .grid-rows {
|
|
385
|
+
/// &-#{$i} {
|
|
386
|
+
/// grid-template-rows: repeat(#{$i}, minmax(0, 1fr));
|
|
387
|
+
/// }
|
|
388
|
+
/// }
|
|
389
|
+
/// }
|
|
390
|
+
/// .grid-rows-none {
|
|
391
|
+
/// grid-template-rows: none;
|
|
392
|
+
/// }
|
|
393
|
+
/// @example html - use gap class
|
|
394
|
+
/// <div class="grid grid-rows-4 grid-flow-col gap-4 font-mono text-white text-sm text-center font-bold leading-6 bg-stripes-pink rounded-lg">
|
|
395
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">01</div>
|
|
396
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">02</div>
|
|
397
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">03</div>
|
|
398
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">04</div>
|
|
399
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">05</div>
|
|
400
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">06</div>
|
|
401
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">07</div>
|
|
402
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">08</div>
|
|
403
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-pink">09</div>
|
|
404
|
+
/// </div>
|
|
405
|
+
//
|
|
406
|
+
@for $i from 1 through 6 {
|
|
407
|
+
|
|
408
|
+
.grid-rows {
|
|
409
|
+
|
|
410
|
+
&-#{$i} {
|
|
411
|
+
grid-template-rows: repeat(#{$i}, minmax(0, 1fr));
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
.grid-rows-none {
|
|
416
|
+
|
|
417
|
+
grid-template-rows: none;
|
|
418
|
+
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
///
|
|
422
|
+
/// This code is written in Sass, a preprocessor scripting language that compiles into CSS.
|
|
423
|
+
///
|
|
424
|
+
/// The code is creating a loop using the "@for" directive in Sass. It is iterating from 1 through 6 using the variable $i.
|
|
425
|
+
///
|
|
426
|
+
/// Within the loop, a class selector ".grid-rows" is defined with a nested selector "-#{$i}",
|
|
427
|
+
/// which creates classes named ".grid-rows-1", ".grid-rows-2", etc., depending on the iteration.
|
|
428
|
+
///
|
|
429
|
+
/// Each nested selector sets the "grid-template-rows" property of the grid to follow a pattern of repeated rows using "repeat()" with
|
|
430
|
+
/// the number of repetitions being equal to the iteration number, "#{$i}", and "minmax()" with a minimum size of 0 and a maximum size of 1 fraction unit.
|
|
431
|
+
///
|
|
432
|
+
/// Finally, there is a static class selector ".grid-rows-none" that sets the grid-template-rows property to "none".
|
|
433
|
+
///
|
|
434
|
+
/// @group Gridrowstart
|
|
435
|
+
/// @name grid_row_start
|
|
436
|
+
/// @link src/scss/utilities/_grid.scss
|
|
437
|
+
/// @since 1.0.0
|
|
438
|
+
/// @author Serge Cools
|
|
439
|
+
///
|
|
440
|
+
/// Applies to: multi-rows elements, flex containers, grid containers
|
|
441
|
+
///
|
|
442
|
+
/// @example scss - grid row start class
|
|
443
|
+
/// @for $i from 1 through 7 {
|
|
444
|
+
/// .grid-row-start {
|
|
445
|
+
/// &-#{$i} {
|
|
446
|
+
/// grid-row-start: #{$i} ;
|
|
447
|
+
/// }
|
|
448
|
+
/// }
|
|
449
|
+
/// }
|
|
450
|
+
/// .grid-row-start-auto {
|
|
451
|
+
/// grid-row-start: auto;
|
|
452
|
+
/// }
|
|
453
|
+
/// @example html - use gap class
|
|
454
|
+
/// <div class="grid grid-cols-3 gap-4 font-mono text-white text-sm text-center font-bold leading-6">
|
|
455
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">01</div>
|
|
456
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">02</div>
|
|
457
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">03</div>
|
|
458
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo col-span-2">04</div>
|
|
459
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">05</div>
|
|
460
|
+
/// <div class="p-4 rounded-lg bg-indigo text-indigo">06</div>
|
|
461
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-indigo col-span-2">07</div>
|
|
462
|
+
/// </div>
|
|
463
|
+
//
|
|
464
|
+
@for $i from 1 through 7 {
|
|
465
|
+
|
|
466
|
+
.grid-row-start {
|
|
467
|
+
|
|
468
|
+
&-#{$i} {
|
|
469
|
+
grid-row-start: #{$i} ;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
.grid-row-start-auto {
|
|
474
|
+
|
|
475
|
+
grid-row-start: auto;
|
|
476
|
+
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
///
|
|
480
|
+
/// This code is written in Sass, a preprocessor scripting language that compiles into CSS.
|
|
481
|
+
///
|
|
482
|
+
/// The code is creating a loop using the "@for" directive in Sass. It is iterating from 1 through 6 using the variable $i.
|
|
483
|
+
///
|
|
484
|
+
/// Within the loop, a class selector ".grid-rows" is defined with a nested selector "-#{$i}",
|
|
485
|
+
/// which creates classes named ".grid-rows-1", ".grid-rows-2", etc., depending on the iteration.
|
|
486
|
+
///
|
|
487
|
+
/// Each nested selector sets the "grid-template-rows" property of the grid to follow a pattern of repeated rows using "repeat()" with
|
|
488
|
+
/// the number of repetitions being equal to the iteration number, "#{$i}", and "minmax()" with a minimum size of 0 and a maximum size of 1 fraction unit.
|
|
489
|
+
///
|
|
490
|
+
/// Finally, there is a static class selector ".grid-rows-none" that sets the grid-template-rows property to "none".
|
|
491
|
+
///
|
|
492
|
+
/// @group Gridrowend
|
|
493
|
+
/// @name grid_row_end
|
|
494
|
+
/// @link src/scss/utilities/_grid.scss
|
|
495
|
+
/// @since 1.0.0
|
|
496
|
+
/// @author Serge Cools
|
|
497
|
+
///
|
|
498
|
+
/// Applies to: multi-row elements, flex containers, grid containers
|
|
499
|
+
///
|
|
500
|
+
/// @example scss - grid row end class
|
|
501
|
+
/// @for $i from 1 through 7 {
|
|
502
|
+
/// .grid-row-end {
|
|
503
|
+
/// &-#{$i} {
|
|
504
|
+
/// grid-row-end: #{$i} ;
|
|
505
|
+
/// }
|
|
506
|
+
/// }
|
|
507
|
+
/// }
|
|
508
|
+
/// .grid-row-end-auto {
|
|
509
|
+
/// grid-row-end: auto;
|
|
510
|
+
/// }
|
|
511
|
+
/// @example html - use gap class
|
|
512
|
+
/// <div class="grid grid-cols-6 gap-4 font-mono text-white text-sm text-center font-bold leading-6">
|
|
513
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
514
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-start-2 grid-col-4">01</div>
|
|
515
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
516
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-start-1 grid-col-end-3">02</div>
|
|
517
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
518
|
+
/// <div class="p-4 rounded-lg bg-stripes-sky"></div>
|
|
519
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-end-7 grid-col-2">03</div>
|
|
520
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-sky grid-col-start-1 grid-col-end-7">04</div>
|
|
521
|
+
/// </div>
|
|
522
|
+
//
|
|
523
|
+
@for $i from 1 through 7 {
|
|
524
|
+
|
|
525
|
+
.grid-row-end {
|
|
526
|
+
|
|
527
|
+
&-#{$i} {
|
|
528
|
+
grid-row-end: #{$i} ;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
.grid-row-end-auto {
|
|
533
|
+
|
|
534
|
+
grid-row-end: auto;
|
|
535
|
+
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/* Grid Auto */
|
|
539
|
+
///
|
|
540
|
+
/// This code is a Sass @each loop that iterates over a map called $autoflow.
|
|
541
|
+
/// For each key-value pair in the map, it generates a CSS class that sets the grid-auto-flow property to the corresponding value.
|
|
542
|
+
///
|
|
543
|
+
/// The generated class will be of the form .grid-flow-{key} where {key} is the key from the $autoflow map.
|
|
544
|
+
/// The value associated with that key is assigned to the grid-auto-flow property.
|
|
545
|
+
///
|
|
546
|
+
/// @group Gridautoflow
|
|
547
|
+
/// @name grid_auto_flow
|
|
548
|
+
/// @link src/scss/utilities/_grid.scss
|
|
549
|
+
/// @since 1.0.0
|
|
550
|
+
/// @author Serge Cools
|
|
551
|
+
///
|
|
552
|
+
/// Applies to: all elements
|
|
553
|
+
///
|
|
554
|
+
/// @require $autoflow
|
|
555
|
+
/// @example scss - grid auto flow class
|
|
556
|
+
/// @each $autoflow-prop, $autoflow-value in $autoflow {
|
|
557
|
+
/// .grid-flow {
|
|
558
|
+
/// &-#{$autoflow-prop}{
|
|
559
|
+
/// grid-auto-flow: $autoflow-value
|
|
560
|
+
/// }
|
|
561
|
+
/// }
|
|
562
|
+
/// }
|
|
563
|
+
/// @example html - use grid class
|
|
564
|
+
/// <div class="grid grid-cols-3 grid-rows-3 grid-flow-row-dense gap-4 font-mono text-white text-sm text-center font-bold leading-6 bg-stripes-purple rounded-lg">
|
|
565
|
+
/// <div class="p-4 grid-col-2 rounded-lg bg-violet">01</div>
|
|
566
|
+
/// <div class="p-4 grid-col-2 rounded-lg bg-violet">02</div>
|
|
567
|
+
/// <div class="p-4 rounded-lg shadow-lg bg-purple">03</div>
|
|
568
|
+
/// <div class="p-4 rounded-lg bg-violet">04</div>
|
|
569
|
+
/// <div class="p-4 rounded-lg bg-violet">05</div>
|
|
570
|
+
/// </div>
|
|
571
|
+
@each $autoflow-prop, $autoflow-value in $autoflow {
|
|
572
|
+
|
|
573
|
+
.grid-flow {
|
|
574
|
+
|
|
575
|
+
&-#{$autoflow-prop}{
|
|
576
|
+
|
|
577
|
+
grid-auto-flow: $autoflow-value
|
|
578
|
+
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
///
|
|
584
|
+
/// This code is a Sass @each loop that iterates over a map called $autoflow.
|
|
585
|
+
/// For each key-value pair in the map, it generates a CSS class that sets the grid-auto-flow property to the corresponding value.
|
|
586
|
+
///
|
|
587
|
+
/// The generated class will be of the form .grid-flow-{key} where {key} is the key from the $autoflow map.
|
|
588
|
+
/// The value associated with that key is assigned to the grid-auto-flow property.
|
|
589
|
+
///
|
|
590
|
+
/// @group Gridautocolumnsrows
|
|
591
|
+
/// @name grid_auto_columns_&_Rows
|
|
592
|
+
/// @link src/scss/utilities/_grid.scss
|
|
593
|
+
/// @since 1.0.0
|
|
594
|
+
/// @author Serge Cools
|
|
595
|
+
///
|
|
596
|
+
/// Applies to: all elements
|
|
597
|
+
///
|
|
598
|
+
/// @require $autocolumnsrows
|
|
599
|
+
/// @example scss - grid auto columns class & grid auto rows class
|
|
600
|
+
/// @each $autocolumnsrows-prop, $autocolumnsrows-value in $autocolumnsrows {
|
|
601
|
+
/// .grid-cols {
|
|
602
|
+
/// &-#{$autocolumnsrows-prop}{
|
|
603
|
+
/// grid-auto-columns: $autocolumnsrows-value
|
|
604
|
+
/// }
|
|
605
|
+
/// }
|
|
606
|
+
/// .grid-rows {
|
|
607
|
+
/// &-#{$autocolumnsrows-prop}{
|
|
608
|
+
/// grid-auto-rows: $autocolumnsrows-value
|
|
609
|
+
/// }
|
|
610
|
+
/// }
|
|
611
|
+
/// }
|
|
612
|
+
/// @example html - use grid class
|
|
613
|
+
/// <div class="grid">
|
|
614
|
+
///
|
|
615
|
+
/// </div>
|
|
616
|
+
@each $autocolumnsrows-prop, $autocolumnsrows-value in $autocolumnsrows {
|
|
617
|
+
|
|
618
|
+
.grid-cols {
|
|
619
|
+
|
|
620
|
+
&-#{$autocolumnsrows-prop}{
|
|
621
|
+
|
|
622
|
+
grid-auto-columns: $autocolumnsrows-value
|
|
623
|
+
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
.grid-rows {
|
|
627
|
+
|
|
628
|
+
&-#{$autocolumnsrows-prop}{
|
|
629
|
+
|
|
630
|
+
grid-auto-rows: $autocolumnsrows-value
|
|
631
|
+
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
/* ===================================================================
|
|
636
|
+
Short grid aliases
|
|
637
|
+
Shorter class names alongside the existing OmniaCSS grid classes.
|
|
638
|
+
=================================================================== */
|
|
639
|
+
|
|
640
|
+
/* Column span aliases: .col-span-{n} = .grid-col-{n} */
|
|
641
|
+
@for $i from 1 through 12 {
|
|
642
|
+
.col-span-#{$i} { grid-column: span #{$i} / span #{$i}; }
|
|
643
|
+
}
|
|
644
|
+
.col-span-full { grid-column: 1 / -1; }
|
|
645
|
+
.col-span-auto { grid-column: auto; }
|
|
646
|
+
|
|
647
|
+
/* Row span aliases: .row-span-{n} = .grid-row-{n} */
|
|
648
|
+
@for $i from 1 through 6 {
|
|
649
|
+
.row-span-#{$i} { grid-row: span #{$i} / span #{$i}; }
|
|
650
|
+
}
|
|
651
|
+
.row-span-full { grid-row: 1 / -1; }
|
|
652
|
+
|
|
653
|
+
/* Column start/end aliases */
|
|
654
|
+
@for $i from 1 through 13 {
|
|
655
|
+
.col-start-#{$i} { grid-column-start: #{$i}; }
|
|
656
|
+
.col-end-#{$i} { grid-column-end: #{$i}; }
|
|
657
|
+
}
|
|
658
|
+
.col-start-auto { grid-column-start: auto; }
|
|
659
|
+
.col-end-auto { grid-column-end: auto; }
|
|
660
|
+
|
|
661
|
+
/* Row start/end aliases */
|
|
662
|
+
@for $i from 1 through 7 {
|
|
663
|
+
.row-start-#{$i} { grid-row-start: #{$i}; }
|
|
664
|
+
.row-end-#{$i} { grid-row-end: #{$i}; }
|
|
665
|
+
}
|
|
666
|
+
.row-start-auto { grid-row-start: auto; }
|
|
667
|
+
.row-end-auto { grid-row-end: auto; }
|
|
668
|
+
|
|
669
|
+
/* Subgrid */
|
|
670
|
+
.grid-cols-subgrid { grid-template-columns: subgrid; }
|
|
671
|
+
.grid-rows-subgrid { grid-template-rows: subgrid; }
|
|
672
|
+
|
|
673
|
+
/* End Grid property */
|