@birdycom/omniacss 0.11.0 → 0.11.2
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 -21
- package/README.md +44 -44
- package/dist/oc-theme.css +1 -1
- package/dist/omnia.css +2 -1
- package/dist/omnia.min.css +1 -1
- package/dist/omnia.starter.css +2 -0
- package/dist/omnia.starter.min.css +1 -1
- package/dist/tokens/omnia.dtcg.json +2 -2
- package/dist/tokens/omnia.tokens.json +1 -1
- package/dist/tokens/omnia_tokens.py +2 -2
- package/package.json +63 -63
- package/scss/utilities/_anchor_positioning.scss +65 -65
- package/scss/utilities/_animation_properties.scss +143 -143
- package/scss/utilities/_borders_extended.scss +97 -97
- package/scss/utilities/_borders_outlines.scss +161 -161
- package/scss/utilities/_containment.scss +82 -82
- package/scss/utilities/_css_functions.scss +34 -34
- package/scss/utilities/_dark_mode.scss +117 -117
- package/scss/utilities/_drop_shadow_colors.scss +26 -26
- package/scss/utilities/_experimental_css.scss +149 -149
- package/scss/utilities/_flexbox.scss +317 -317
- package/scss/utilities/_font_variants.scss +139 -139
- package/scss/utilities/_gap.scss +103 -103
- package/scss/utilities/_gradient_stops.scss +48 -48
- package/scss/utilities/_grid.scss +672 -672
- package/scss/utilities/_layout_extras.scss +171 -171
- package/scss/utilities/_layout_flow.scss +210 -210
- package/scss/utilities/_mask_extras.scss +62 -62
- package/scss/utilities/_motion_transforms.scss +167 -167
- package/scss/utilities/_scroll_animations.scss +80 -80
- package/scss/utilities/_scrollbar.scss +2 -1
- package/scss/utilities/_shadow_tokens.scss +21 -21
- package/scss/utilities/_shapes.scss +72 -72
- package/scss/utilities/_sizing_logical.scss +99 -99
- package/scss/utilities/_starting_style.scss +53 -53
- package/scss/utilities/_state_variants.scss +196 -196
- package/scss/utilities/_svg.scss +100 -100
- package/scss/utilities/_table_advanced.scss +19 -19
- package/scss/utilities/_typography_advanced.scss +124 -124
- package/scss/utilities/_typography_modern.scss +83 -83
- package/scss/utilities/_view_transitions.scss +64 -64
- package/scss/utilities/_writing_modes.scss +72 -72
- package/scss/variables/_hulp.scss +107 -107
- package/scss/variables/_variables_effects.scss +108 -108
- package/src/postcss.mjs +43 -43
- package/src/tokens.mjs +377 -377
- package/src/variants.mjs +278 -278
- package/tokens/semantic.json +80 -80
|
@@ -1,318 +1,318 @@
|
|
|
1
|
-
// SCSS Document
|
|
2
|
-
// File: src/utilities/_flexbox.scss
|
|
3
|
-
// Description: CSS Flex properties
|
|
4
|
-
// Copyright: 2021-2022 Birdycom
|
|
5
|
-
// Autor: Serge Cools
|
|
6
|
-
// Version: 0.2.0
|
|
7
|
-
// Framework: OmniaCSS
|
|
8
|
-
// Properties: display
|
|
9
|
-
// Values: flex
|
|
10
|
-
|
|
11
|
-
@use "sass:string";
|
|
12
|
-
@use "sass:map";
|
|
13
|
-
@use '../utilities/' as *;
|
|
14
|
-
|
|
15
|
-
/* The Flexbox properties */
|
|
16
|
-
|
|
17
|
-
///
|
|
18
|
-
/// The flexbox Property
|
|
19
|
-
/// @group Flex
|
|
20
|
-
///
|
|
21
|
-
|
|
22
|
-
///
|
|
23
|
-
/// The flex property sets the flexible length on flexible items.
|
|
24
|
-
/// @group Flex
|
|
25
|
-
/// @name flex
|
|
26
|
-
/// @link src/scss/utilities/_flexbox.scss
|
|
27
|
-
/// @since 1.0.0
|
|
28
|
-
/// @author Serge Cools
|
|
29
|
-
///
|
|
30
|
-
/// Applies to: all elements
|
|
31
|
-
///
|
|
32
|
-
/// @require $displayflex
|
|
33
|
-
/// @example scss - flex class
|
|
34
|
-
/// .flex {
|
|
35
|
-
/// display: flex;
|
|
36
|
-
/// }
|
|
37
|
-
/// @example html - use flex class
|
|
38
|
-
/// <div class="flex">
|
|
39
|
-
///
|
|
40
|
-
/// </div>
|
|
41
|
-
@each $display-prop in $displayflex {
|
|
42
|
-
.#{$display-prop}{
|
|
43
|
-
|
|
44
|
-
display: $display-prop
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// The flex-wrap property
|
|
50
|
-
|
|
51
|
-
///
|
|
52
|
-
/// The flex-wrap property specifies whether the flexible items should wrap or not.
|
|
53
|
-
/// @group wrap
|
|
54
|
-
/// @name flex-wrap
|
|
55
|
-
/// @link src/scss/utilities/_flexbox.scss
|
|
56
|
-
/// @since 1.0.0
|
|
57
|
-
/// @author Serge Cools
|
|
58
|
-
///
|
|
59
|
-
/// Applies to: all elements
|
|
60
|
-
///
|
|
61
|
-
/// @require $flexwrap
|
|
62
|
-
/// @example scss - flex wrap class
|
|
63
|
-
/// @each $flexwrap-prop, $flexwrap-value in $flexwrap {
|
|
64
|
-
/// .#{$flexwrap-prop} {
|
|
65
|
-
/// flex-wrap: $flexwrap-value;
|
|
66
|
-
/// }
|
|
67
|
-
/// }
|
|
68
|
-
/// @example html - use wrap class
|
|
69
|
-
/// <div class="flex nowrap">
|
|
70
|
-
///
|
|
71
|
-
/// </div>
|
|
72
|
-
@each $flexwrap-prop, $flexwrap-value in $flexwrap {
|
|
73
|
-
|
|
74
|
-
.#{$flexwrap-prop} {
|
|
75
|
-
flex-wrap: $flexwrap-value;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// The flex direction property
|
|
80
|
-
|
|
81
|
-
///
|
|
82
|
-
/// The flex-direction property specifies the direction of the flexible items.
|
|
83
|
-
/// @group direction
|
|
84
|
-
/// @name flex-direction
|
|
85
|
-
/// @link src/scss/utilities/_flexbox.scss
|
|
86
|
-
/// @since 1.0.0
|
|
87
|
-
/// @author Serge Cools
|
|
88
|
-
///
|
|
89
|
-
/// Applies to: all elements
|
|
90
|
-
///
|
|
91
|
-
/// @require $flexdirection
|
|
92
|
-
/// @example scss - flex direction class
|
|
93
|
-
/// @each $flexdirection-prop, $flexdirection-value in $flexdirection {
|
|
94
|
-
/// .flex-#{$flexdirection-prop} {
|
|
95
|
-
/// flex-direction: $flexdirection-value;
|
|
96
|
-
/// }
|
|
97
|
-
/// }
|
|
98
|
-
/// @example html - use flex direction class
|
|
99
|
-
/// <div class="flex flex-row">
|
|
100
|
-
///
|
|
101
|
-
/// </div>
|
|
102
|
-
@each $flexdirection-prop, $flexdirection-value in $flexdirection {
|
|
103
|
-
|
|
104
|
-
.flex-#{$flexdirection-prop} {
|
|
105
|
-
flex-direction: $flexdirection-value;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// The flex basis property
|
|
110
|
-
|
|
111
|
-
///
|
|
112
|
-
/// The flex-basis property specifies the initial length of a flexible item.
|
|
113
|
-
/// Note: If the element is not a flexible item, the flex-basis property has no effect.
|
|
114
|
-
/// @group basis
|
|
115
|
-
/// @name flex-basis
|
|
116
|
-
/// @link src/scss/utilities/_flexbox.scss
|
|
117
|
-
/// @since 1.0.0
|
|
118
|
-
/// @author Serge Cools
|
|
119
|
-
///
|
|
120
|
-
/// Applies to: all elements
|
|
121
|
-
///
|
|
122
|
-
/// @require $sizesrem
|
|
123
|
-
/// @example scss - flex basis class
|
|
124
|
-
/// @each $sizesrem-prop, $sizesrem-value in $sizesrem {
|
|
125
|
-
/// $number: string.slice($sizesrem-prop, 6);
|
|
126
|
-
/// .basis-#{$number} {
|
|
127
|
-
/// flex-basis: $sizesrem-value;
|
|
128
|
-
/// }
|
|
129
|
-
/// }
|
|
130
|
-
/// @example html - use flex basis class
|
|
131
|
-
/// <div class="flex basis-1.5">
|
|
132
|
-
///
|
|
133
|
-
/// </div>
|
|
134
|
-
//
|
|
135
|
-
$min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
136
|
-
$run: 0;
|
|
137
|
-
@while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
|
|
138
|
-
|
|
139
|
-
$result: omnia-generate-sizing($min-group, 'basis', true, $run);
|
|
140
|
-
|
|
141
|
-
$min-group: map.get($result,1);
|
|
142
|
-
$run: map.get($result,6);
|
|
143
|
-
|
|
144
|
-
.#{map.get($result,5)}-#{map.get($result,2)} {
|
|
145
|
-
|
|
146
|
-
#{"flex-"+map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
// width full
|
|
151
|
-
.basis-full {
|
|
152
|
-
|
|
153
|
-
flex-basis: $DEFAULT-BASE-SIZE-PERCENT;
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// flex-basis with percent
|
|
158
|
-
// divide the width in half (100% / 2)
|
|
159
|
-
@for $i from 1 through 1 {
|
|
160
|
-
|
|
161
|
-
.basis-perc {
|
|
162
|
-
|
|
163
|
-
&-#{$i}\/2 {
|
|
164
|
-
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 2 * $i);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// divide the width in three (100% / 3)
|
|
170
|
-
@for $i from 1 through 2 {
|
|
171
|
-
|
|
172
|
-
.basis-perc {
|
|
173
|
-
|
|
174
|
-
&-#{$i}\/3 {
|
|
175
|
-
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 3 * $i);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// divide the width into four (100% / 4)
|
|
181
|
-
@for $i from 1 through 3 {
|
|
182
|
-
|
|
183
|
-
.basis-perc {
|
|
184
|
-
|
|
185
|
-
&-#{$i}\/4 {
|
|
186
|
-
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 4 * $i);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// divide the width into five (100% / 5)
|
|
192
|
-
@for $i from 1 through 4 {
|
|
193
|
-
|
|
194
|
-
.basis-perc {
|
|
195
|
-
|
|
196
|
-
&-#{$i}\/5 {
|
|
197
|
-
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 5 * $i);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// divide the width into six (100% / 6)
|
|
203
|
-
@for $i from 1 through 5 {
|
|
204
|
-
|
|
205
|
-
.basis-perc {
|
|
206
|
-
|
|
207
|
-
&-#{$i}\/6 {
|
|
208
|
-
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 6 * $i);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// divide the width into twelve (100% / 12)
|
|
214
|
-
@for $i from 1 through 11 {
|
|
215
|
-
|
|
216
|
-
.basis-perc {
|
|
217
|
-
|
|
218
|
-
&-#{$i}\/12 {
|
|
219
|
-
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 12 * $i);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
///
|
|
225
|
-
/// The flex-grow property specifies how much the item will grow relative to the rest of the flexible items inside the same container.
|
|
226
|
-
/// Note: If the element is not a flexible item, the flex-grow property has no effect.
|
|
227
|
-
/// @group grow
|
|
228
|
-
/// @name flex-grow
|
|
229
|
-
/// @link src/scss/utilities/_flexbox.scss
|
|
230
|
-
/// @since 1.0.0
|
|
231
|
-
/// @author Serge Cools
|
|
232
|
-
///
|
|
233
|
-
/// Applies to: all elements
|
|
234
|
-
///
|
|
235
|
-
/// @require $flexgrow
|
|
236
|
-
/// @example scss - flex grow class
|
|
237
|
-
/// @each $flexgrow-prop, $flexgrow-value in $flexgrow {
|
|
238
|
-
/// .#{$flexgrow-prop} {
|
|
239
|
-
/// flex-grow : $flexgrow-value
|
|
240
|
-
/// }
|
|
241
|
-
/// }
|
|
242
|
-
/// @example html - use flex grow class
|
|
243
|
-
/// <div class="flex grow">
|
|
244
|
-
///
|
|
245
|
-
/// </div>
|
|
246
|
-
@each $flexgrow-prop, $flexgrow-value in $flexgrow {
|
|
247
|
-
|
|
248
|
-
.#{$flexgrow-prop} {
|
|
249
|
-
flex-grow : $flexgrow-value
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
///
|
|
255
|
-
/// The flex-shrink property specifies how much the item will shrink relative to the rest of the flexible items inside the same container.
|
|
256
|
-
/// Note: If the element is not a flexible item, the flex-shrink property has no effect.
|
|
257
|
-
/// @group shrink
|
|
258
|
-
/// @name flex-shrink
|
|
259
|
-
/// @link src/scss/utilities/_flexbox.scss
|
|
260
|
-
/// @since 1.0.0
|
|
261
|
-
/// @author Serge Cools
|
|
262
|
-
///
|
|
263
|
-
/// Applies to: all elements
|
|
264
|
-
///
|
|
265
|
-
/// @require $flexshrink
|
|
266
|
-
/// @example scss - flex shrink class
|
|
267
|
-
/// @each $flexshrink-prop, $flexshrink-value in $flexshrink {
|
|
268
|
-
/// .#{$flexshrink-prop} {
|
|
269
|
-
/// flex-shrink : $flexshrink-value
|
|
270
|
-
/// }
|
|
271
|
-
/// }
|
|
272
|
-
/// @example html - use flex shrink class
|
|
273
|
-
/// <div class="flex shrink">
|
|
274
|
-
///
|
|
275
|
-
/// </div>
|
|
276
|
-
@each $flexshrink-prop, $flexshrink-value in $flexshrink {
|
|
277
|
-
|
|
278
|
-
.#{$flexshrink-prop} {
|
|
279
|
-
flex-shrink : $flexshrink-value
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
/* Flex shorthand — combined grow/shrink/basis for common patterns. */
|
|
284
|
-
|
|
285
|
-
// flex-1: allows item to grow and shrink, ignoring initial size
|
|
286
|
-
.flex-1 { flex: 1 1 0%; }
|
|
287
|
-
|
|
288
|
-
// flex-auto: allows item to grow and shrink, starting from auto size
|
|
289
|
-
.flex-auto { flex: 1 1 auto; }
|
|
290
|
-
|
|
291
|
-
// flex-initial: allows item to shrink but not grow (default browser behavior)
|
|
292
|
-
.flex-initial { flex: 0 1 auto; }
|
|
293
|
-
|
|
294
|
-
// flex-none: prevents item from growing or shrinking
|
|
295
|
-
.flex-none { flex: none; }
|
|
296
|
-
|
|
297
|
-
/* ===================================================================
|
|
298
|
-
Short aliases
|
|
299
|
-
Short, commonly used names next to the long OmniaCSS class names
|
|
300
|
-
while keeping the original OmniaCSS class names intact.
|
|
301
|
-
=================================================================== */
|
|
302
|
-
|
|
303
|
-
/* Direction alias: .flex-col = .flex-column */
|
|
304
|
-
.flex-col { flex-direction: column; }
|
|
305
|
-
.flex-col-reverse { flex-direction: column-reverse; }
|
|
306
|
-
|
|
307
|
-
/* Wrap aliases: .flex-wrap, .flex-nowrap, .flex-wrap-reverse */
|
|
308
|
-
.flex-wrap { flex-wrap: wrap; }
|
|
309
|
-
.flex-nowrap { flex-wrap: nowrap; }
|
|
310
|
-
.flex-wrap-reverse { flex-wrap: wrap-reverse; }
|
|
311
|
-
|
|
312
|
-
/* Grow/shrink aliases with numeric suffix */
|
|
313
|
-
.flex-grow { flex-grow: 1; }
|
|
314
|
-
.flex-grow-0 { flex-grow: 0; }
|
|
315
|
-
.flex-shrink { flex-shrink: 1; }
|
|
316
|
-
.flex-shrink-0 { flex-shrink: 0; }
|
|
317
|
-
|
|
1
|
+
// SCSS Document
|
|
2
|
+
// File: src/utilities/_flexbox.scss
|
|
3
|
+
// Description: CSS Flex properties
|
|
4
|
+
// Copyright: 2021-2022 Birdycom
|
|
5
|
+
// Autor: Serge Cools
|
|
6
|
+
// Version: 0.2.0
|
|
7
|
+
// Framework: OmniaCSS
|
|
8
|
+
// Properties: display
|
|
9
|
+
// Values: flex
|
|
10
|
+
|
|
11
|
+
@use "sass:string";
|
|
12
|
+
@use "sass:map";
|
|
13
|
+
@use '../utilities/' as *;
|
|
14
|
+
|
|
15
|
+
/* The Flexbox properties */
|
|
16
|
+
|
|
17
|
+
///
|
|
18
|
+
/// The flexbox Property
|
|
19
|
+
/// @group Flex
|
|
20
|
+
///
|
|
21
|
+
|
|
22
|
+
///
|
|
23
|
+
/// The flex property sets the flexible length on flexible items.
|
|
24
|
+
/// @group Flex
|
|
25
|
+
/// @name flex
|
|
26
|
+
/// @link src/scss/utilities/_flexbox.scss
|
|
27
|
+
/// @since 1.0.0
|
|
28
|
+
/// @author Serge Cools
|
|
29
|
+
///
|
|
30
|
+
/// Applies to: all elements
|
|
31
|
+
///
|
|
32
|
+
/// @require $displayflex
|
|
33
|
+
/// @example scss - flex class
|
|
34
|
+
/// .flex {
|
|
35
|
+
/// display: flex;
|
|
36
|
+
/// }
|
|
37
|
+
/// @example html - use flex class
|
|
38
|
+
/// <div class="flex">
|
|
39
|
+
///
|
|
40
|
+
/// </div>
|
|
41
|
+
@each $display-prop in $displayflex {
|
|
42
|
+
.#{$display-prop}{
|
|
43
|
+
|
|
44
|
+
display: $display-prop
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// The flex-wrap property
|
|
50
|
+
|
|
51
|
+
///
|
|
52
|
+
/// The flex-wrap property specifies whether the flexible items should wrap or not.
|
|
53
|
+
/// @group wrap
|
|
54
|
+
/// @name flex-wrap
|
|
55
|
+
/// @link src/scss/utilities/_flexbox.scss
|
|
56
|
+
/// @since 1.0.0
|
|
57
|
+
/// @author Serge Cools
|
|
58
|
+
///
|
|
59
|
+
/// Applies to: all elements
|
|
60
|
+
///
|
|
61
|
+
/// @require $flexwrap
|
|
62
|
+
/// @example scss - flex wrap class
|
|
63
|
+
/// @each $flexwrap-prop, $flexwrap-value in $flexwrap {
|
|
64
|
+
/// .#{$flexwrap-prop} {
|
|
65
|
+
/// flex-wrap: $flexwrap-value;
|
|
66
|
+
/// }
|
|
67
|
+
/// }
|
|
68
|
+
/// @example html - use wrap class
|
|
69
|
+
/// <div class="flex nowrap">
|
|
70
|
+
///
|
|
71
|
+
/// </div>
|
|
72
|
+
@each $flexwrap-prop, $flexwrap-value in $flexwrap {
|
|
73
|
+
|
|
74
|
+
.#{$flexwrap-prop} {
|
|
75
|
+
flex-wrap: $flexwrap-value;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// The flex direction property
|
|
80
|
+
|
|
81
|
+
///
|
|
82
|
+
/// The flex-direction property specifies the direction of the flexible items.
|
|
83
|
+
/// @group direction
|
|
84
|
+
/// @name flex-direction
|
|
85
|
+
/// @link src/scss/utilities/_flexbox.scss
|
|
86
|
+
/// @since 1.0.0
|
|
87
|
+
/// @author Serge Cools
|
|
88
|
+
///
|
|
89
|
+
/// Applies to: all elements
|
|
90
|
+
///
|
|
91
|
+
/// @require $flexdirection
|
|
92
|
+
/// @example scss - flex direction class
|
|
93
|
+
/// @each $flexdirection-prop, $flexdirection-value in $flexdirection {
|
|
94
|
+
/// .flex-#{$flexdirection-prop} {
|
|
95
|
+
/// flex-direction: $flexdirection-value;
|
|
96
|
+
/// }
|
|
97
|
+
/// }
|
|
98
|
+
/// @example html - use flex direction class
|
|
99
|
+
/// <div class="flex flex-row">
|
|
100
|
+
///
|
|
101
|
+
/// </div>
|
|
102
|
+
@each $flexdirection-prop, $flexdirection-value in $flexdirection {
|
|
103
|
+
|
|
104
|
+
.flex-#{$flexdirection-prop} {
|
|
105
|
+
flex-direction: $flexdirection-value;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// The flex basis property
|
|
110
|
+
|
|
111
|
+
///
|
|
112
|
+
/// The flex-basis property specifies the initial length of a flexible item.
|
|
113
|
+
/// Note: If the element is not a flexible item, the flex-basis property has no effect.
|
|
114
|
+
/// @group basis
|
|
115
|
+
/// @name flex-basis
|
|
116
|
+
/// @link src/scss/utilities/_flexbox.scss
|
|
117
|
+
/// @since 1.0.0
|
|
118
|
+
/// @author Serge Cools
|
|
119
|
+
///
|
|
120
|
+
/// Applies to: all elements
|
|
121
|
+
///
|
|
122
|
+
/// @require $sizesrem
|
|
123
|
+
/// @example scss - flex basis class
|
|
124
|
+
/// @each $sizesrem-prop, $sizesrem-value in $sizesrem {
|
|
125
|
+
/// $number: string.slice($sizesrem-prop, 6);
|
|
126
|
+
/// .basis-#{$number} {
|
|
127
|
+
/// flex-basis: $sizesrem-value;
|
|
128
|
+
/// }
|
|
129
|
+
/// }
|
|
130
|
+
/// @example html - use flex basis class
|
|
131
|
+
/// <div class="flex basis-1.5">
|
|
132
|
+
///
|
|
133
|
+
/// </div>
|
|
134
|
+
//
|
|
135
|
+
$min-group: $DEFAULT-BASE-FIRST-MIN-GROUP;
|
|
136
|
+
$run: 0;
|
|
137
|
+
@while $min-group <= $DEFAULT-BASE-SECOND-MAX-GROUP {
|
|
138
|
+
|
|
139
|
+
$result: omnia-generate-sizing($min-group, 'basis', true, $run);
|
|
140
|
+
|
|
141
|
+
$min-group: map.get($result,1);
|
|
142
|
+
$run: map.get($result,6);
|
|
143
|
+
|
|
144
|
+
.#{map.get($result,5)}-#{map.get($result,2)} {
|
|
145
|
+
|
|
146
|
+
#{"flex-"+map.get($result,5)} : map.get($result,3) + #{map.get($result,4)}
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
// width full
|
|
151
|
+
.basis-full {
|
|
152
|
+
|
|
153
|
+
flex-basis: $DEFAULT-BASE-SIZE-PERCENT;
|
|
154
|
+
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// flex-basis with percent
|
|
158
|
+
// divide the width in half (100% / 2)
|
|
159
|
+
@for $i from 1 through 1 {
|
|
160
|
+
|
|
161
|
+
.basis-perc {
|
|
162
|
+
|
|
163
|
+
&-#{$i}\/2 {
|
|
164
|
+
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 2 * $i);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// divide the width in three (100% / 3)
|
|
170
|
+
@for $i from 1 through 2 {
|
|
171
|
+
|
|
172
|
+
.basis-perc {
|
|
173
|
+
|
|
174
|
+
&-#{$i}\/3 {
|
|
175
|
+
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 3 * $i);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// divide the width into four (100% / 4)
|
|
181
|
+
@for $i from 1 through 3 {
|
|
182
|
+
|
|
183
|
+
.basis-perc {
|
|
184
|
+
|
|
185
|
+
&-#{$i}\/4 {
|
|
186
|
+
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 4 * $i);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// divide the width into five (100% / 5)
|
|
192
|
+
@for $i from 1 through 4 {
|
|
193
|
+
|
|
194
|
+
.basis-perc {
|
|
195
|
+
|
|
196
|
+
&-#{$i}\/5 {
|
|
197
|
+
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 5 * $i);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// divide the width into six (100% / 6)
|
|
203
|
+
@for $i from 1 through 5 {
|
|
204
|
+
|
|
205
|
+
.basis-perc {
|
|
206
|
+
|
|
207
|
+
&-#{$i}\/6 {
|
|
208
|
+
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 6 * $i);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// divide the width into twelve (100% / 12)
|
|
214
|
+
@for $i from 1 through 11 {
|
|
215
|
+
|
|
216
|
+
.basis-perc {
|
|
217
|
+
|
|
218
|
+
&-#{$i}\/12 {
|
|
219
|
+
flex-basis: calc($DEFAULT-BASE-SIZE-PERCENT / 12 * $i);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
///
|
|
225
|
+
/// The flex-grow property specifies how much the item will grow relative to the rest of the flexible items inside the same container.
|
|
226
|
+
/// Note: If the element is not a flexible item, the flex-grow property has no effect.
|
|
227
|
+
/// @group grow
|
|
228
|
+
/// @name flex-grow
|
|
229
|
+
/// @link src/scss/utilities/_flexbox.scss
|
|
230
|
+
/// @since 1.0.0
|
|
231
|
+
/// @author Serge Cools
|
|
232
|
+
///
|
|
233
|
+
/// Applies to: all elements
|
|
234
|
+
///
|
|
235
|
+
/// @require $flexgrow
|
|
236
|
+
/// @example scss - flex grow class
|
|
237
|
+
/// @each $flexgrow-prop, $flexgrow-value in $flexgrow {
|
|
238
|
+
/// .#{$flexgrow-prop} {
|
|
239
|
+
/// flex-grow : $flexgrow-value
|
|
240
|
+
/// }
|
|
241
|
+
/// }
|
|
242
|
+
/// @example html - use flex grow class
|
|
243
|
+
/// <div class="flex grow">
|
|
244
|
+
///
|
|
245
|
+
/// </div>
|
|
246
|
+
@each $flexgrow-prop, $flexgrow-value in $flexgrow {
|
|
247
|
+
|
|
248
|
+
.#{$flexgrow-prop} {
|
|
249
|
+
flex-grow : $flexgrow-value
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
///
|
|
255
|
+
/// The flex-shrink property specifies how much the item will shrink relative to the rest of the flexible items inside the same container.
|
|
256
|
+
/// Note: If the element is not a flexible item, the flex-shrink property has no effect.
|
|
257
|
+
/// @group shrink
|
|
258
|
+
/// @name flex-shrink
|
|
259
|
+
/// @link src/scss/utilities/_flexbox.scss
|
|
260
|
+
/// @since 1.0.0
|
|
261
|
+
/// @author Serge Cools
|
|
262
|
+
///
|
|
263
|
+
/// Applies to: all elements
|
|
264
|
+
///
|
|
265
|
+
/// @require $flexshrink
|
|
266
|
+
/// @example scss - flex shrink class
|
|
267
|
+
/// @each $flexshrink-prop, $flexshrink-value in $flexshrink {
|
|
268
|
+
/// .#{$flexshrink-prop} {
|
|
269
|
+
/// flex-shrink : $flexshrink-value
|
|
270
|
+
/// }
|
|
271
|
+
/// }
|
|
272
|
+
/// @example html - use flex shrink class
|
|
273
|
+
/// <div class="flex shrink">
|
|
274
|
+
///
|
|
275
|
+
/// </div>
|
|
276
|
+
@each $flexshrink-prop, $flexshrink-value in $flexshrink {
|
|
277
|
+
|
|
278
|
+
.#{$flexshrink-prop} {
|
|
279
|
+
flex-shrink : $flexshrink-value
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
}
|
|
283
|
+
/* Flex shorthand — combined grow/shrink/basis for common patterns. */
|
|
284
|
+
|
|
285
|
+
// flex-1: allows item to grow and shrink, ignoring initial size
|
|
286
|
+
.flex-1 { flex: 1 1 0%; }
|
|
287
|
+
|
|
288
|
+
// flex-auto: allows item to grow and shrink, starting from auto size
|
|
289
|
+
.flex-auto { flex: 1 1 auto; }
|
|
290
|
+
|
|
291
|
+
// flex-initial: allows item to shrink but not grow (default browser behavior)
|
|
292
|
+
.flex-initial { flex: 0 1 auto; }
|
|
293
|
+
|
|
294
|
+
// flex-none: prevents item from growing or shrinking
|
|
295
|
+
.flex-none { flex: none; }
|
|
296
|
+
|
|
297
|
+
/* ===================================================================
|
|
298
|
+
Short aliases
|
|
299
|
+
Short, commonly used names next to the long OmniaCSS class names
|
|
300
|
+
while keeping the original OmniaCSS class names intact.
|
|
301
|
+
=================================================================== */
|
|
302
|
+
|
|
303
|
+
/* Direction alias: .flex-col = .flex-column */
|
|
304
|
+
.flex-col { flex-direction: column; }
|
|
305
|
+
.flex-col-reverse { flex-direction: column-reverse; }
|
|
306
|
+
|
|
307
|
+
/* Wrap aliases: .flex-wrap, .flex-nowrap, .flex-wrap-reverse */
|
|
308
|
+
.flex-wrap { flex-wrap: wrap; }
|
|
309
|
+
.flex-nowrap { flex-wrap: nowrap; }
|
|
310
|
+
.flex-wrap-reverse { flex-wrap: wrap-reverse; }
|
|
311
|
+
|
|
312
|
+
/* Grow/shrink aliases with numeric suffix */
|
|
313
|
+
.flex-grow { flex-grow: 1; }
|
|
314
|
+
.flex-grow-0 { flex-grow: 0; }
|
|
315
|
+
.flex-shrink { flex-shrink: 1; }
|
|
316
|
+
.flex-shrink-0 { flex-shrink: 0; }
|
|
317
|
+
|
|
318
318
|
/* End Flexbox property */
|