@nuvoui/core 1.3.0 → 1.3.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/dist/nuvoui.css +230 -922
- package/dist/nuvoui.css.map +1 -1
- package/dist/nuvoui.min.css +1 -1
- package/dist/nuvoui.min.css.map +1 -1
- package/package.json +2 -2
- package/src/styles/abstracts/_config.scss +25 -2
- package/src/styles/abstracts/_functions.scss +16 -5
- package/src/styles/base/_base.scss +2 -2
- package/src/styles/base/_reset.scss +0 -2
- package/src/styles/build.scss +3 -0
- package/src/styles/layouts/_container.scss +8 -1
- package/src/styles/layouts/_flex.scss +125 -207
- package/src/styles/layouts/_grid.scss +16 -29
- package/src/styles/themes/_theme.scss +10 -10
- package/src/styles/utilities/_alignment.scss +2 -1
- package/src/styles/utilities/_animations.scss +20 -32
- package/src/styles/utilities/_backdrop-filters.scss +7 -11
- package/src/styles/utilities/_borders.scss +3 -5
- package/src/styles/utilities/_container-queries.scss +17 -21
- package/src/styles/utilities/_cursor.scss +2 -1
- package/src/styles/utilities/_display.scss +17 -37
- package/src/styles/utilities/_helpers.scss +1 -0
- package/src/styles/utilities/_media-queries.scss +3 -5
- package/src/styles/utilities/_opacity.scss +52 -67
- package/src/styles/utilities/_position.scss +104 -132
- package/src/styles/utilities/_shadows.scss +9 -14
- package/src/styles/utilities/_sizing.scss +1 -1
- package/src/styles/utilities/_spacing.scss +143 -205
- package/src/styles/utilities/_tooltips.scss +203 -200
- package/src/styles/utilities/_transforms.scss +9 -11
- package/src/styles/utilities/_transitions.scss +8 -10
- package/src/styles/utilities/_typography.scss +17 -22
- package/src/styles/utilities/_z-index.scss +12 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuvoui/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "NuvoUI is a human-friendly SCSS framework designed for simplicity, and modern responsive designs.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "AALA IT Solutions",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"lint": "stylelint \"src/**/*.scss\"",
|
|
37
37
|
"format": "prettier --write \"src/**/*.{scss,js,json}\"",
|
|
38
38
|
"clean": "node -e \"const fs=require('fs');if(fs.existsSync('dist')) fs.rmSync('dist',{recursive:true})\"",
|
|
39
|
-
"build:scss": "sass src/styles/
|
|
39
|
+
"build:scss": "sass src/styles/build.scss:dist/nuvoui.css --style expanded",
|
|
40
40
|
"build:minify": "postcss dist/nuvoui.css -o dist/nuvoui.min.css --use cssnano --map",
|
|
41
41
|
"prebuild": "npm run clean",
|
|
42
42
|
"build": "npm run build:scss && npm run build:minify",
|
|
@@ -2,8 +2,31 @@
|
|
|
2
2
|
@use "sass:math";
|
|
3
3
|
@use "sass:list";
|
|
4
4
|
|
|
5
|
+
$feature-flags: (
|
|
6
|
+
"alignments": true,
|
|
7
|
+
"animations": true,
|
|
8
|
+
"backdrops": true,
|
|
9
|
+
"borders": true,
|
|
10
|
+
"container-queries": true,
|
|
11
|
+
"cursors": true,
|
|
12
|
+
"displays": true,
|
|
13
|
+
"flex": true,
|
|
14
|
+
"grid": true,
|
|
15
|
+
"opacity": true,
|
|
16
|
+
"position": true,
|
|
17
|
+
"shadows": true,
|
|
18
|
+
"sizing": true,
|
|
19
|
+
"spacing": true,
|
|
20
|
+
"tooltips": true,
|
|
21
|
+
"theme": true,
|
|
22
|
+
"transforms": true,
|
|
23
|
+
"transitions": true,
|
|
24
|
+
"typography": true,
|
|
25
|
+
"z-index": true,
|
|
26
|
+
) !default;
|
|
27
|
+
|
|
5
28
|
// Framework Configuration Options
|
|
6
|
-
$generate-utility-classes:
|
|
29
|
+
$generate-utility-classes: false !default;
|
|
7
30
|
$enable-dark-mode: true !default;
|
|
8
31
|
|
|
9
32
|
$enable-debugger: false !default;
|
|
@@ -205,7 +228,7 @@ $border-radii: (
|
|
|
205
228
|
"lg": 0.75rem,
|
|
206
229
|
"xl": 1rem,
|
|
207
230
|
"2xl": 1.25rem,
|
|
208
|
-
"
|
|
231
|
+
"full": 50%,
|
|
209
232
|
"none": 0,
|
|
210
233
|
) !default;
|
|
211
234
|
|
|
@@ -41,11 +41,9 @@
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* @return {String} - The value with units
|
|
48
|
-
*/
|
|
44
|
+
// Ensures a value has a unit, adding $default-unit if none exists
|
|
45
|
+
// @param {Number|String} $val - The value to check
|
|
46
|
+
// @return {String} - The value with units
|
|
49
47
|
@function fix-units($val, $unit: $default-unit, $debug: null) {
|
|
50
48
|
@if meta.type-of($val) != number and meta.type-of($val) != string {
|
|
51
49
|
@error "fix-units() requires a number or string value";
|
|
@@ -112,3 +110,16 @@
|
|
|
112
110
|
|
|
113
111
|
@return list.append($result, str-trim($string));
|
|
114
112
|
}
|
|
113
|
+
|
|
114
|
+
// Helper function to check if a feature is enabled
|
|
115
|
+
@function feature-enabled($feature) {
|
|
116
|
+
@if not $generate-utility-classes {
|
|
117
|
+
@return false;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@if not map.has-key($feature-flags, $feature) {
|
|
121
|
+
@return true; // Default to enabled if not specified
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@return map.get($feature-flags, $feature);
|
|
125
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Import variables
|
|
4
4
|
@use "../abstracts/config" as *;
|
|
5
5
|
@use "../utilities/media-queries" as media;
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ body#{$parent-selector} {
|
|
|
28
28
|
#{$parent-selector} h5,
|
|
29
29
|
#{$parent-selector} h6 {
|
|
30
30
|
margin-bottom: 0.5em;
|
|
31
|
-
font-family: var(--font-family-
|
|
31
|
+
font-family: var(--font-family-base);
|
|
32
32
|
font-weight: 700;
|
|
33
33
|
line-height: 1.2;
|
|
34
34
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "../abstracts/config" as VAR;
|
|
3
|
+
@use "../abstracts/functions" as FN;
|
|
3
4
|
|
|
4
5
|
// Base container styles
|
|
5
6
|
@mixin container-base {
|
|
@@ -27,9 +28,15 @@
|
|
|
27
28
|
@include container-padding(1rem);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
@if
|
|
31
|
+
@if FN.feature-enabled("container-queries") {
|
|
31
32
|
// Container classes
|
|
32
33
|
#{VAR.$parent-selector} .container {
|
|
33
34
|
@include container;
|
|
34
35
|
}
|
|
36
|
+
#{VAR.$parent-selector} .container.flex {
|
|
37
|
+
@include container(flex);
|
|
38
|
+
}
|
|
39
|
+
#{VAR.$parent-selector} .container.grid {
|
|
40
|
+
@include container(grid);
|
|
41
|
+
}
|
|
35
42
|
}
|
|
@@ -2,398 +2,316 @@
|
|
|
2
2
|
// Module: Flex | Flex Inline
|
|
3
3
|
// Note: Gap utilities are defined in _spacing.scss
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* @see grid
|
|
44
|
-
*/
|
|
5
|
+
// @component Flex
|
|
6
|
+
// @description Flexbox layout system for creating flexible page layouts
|
|
7
|
+
|
|
8
|
+
// @example
|
|
9
|
+
// <div class="flex row between x-center">
|
|
10
|
+
// <div class="w-6">Left column (6 units)</div>
|
|
11
|
+
// <div class="w-6">Right column (6 units)</div>
|
|
12
|
+
// </div>
|
|
13
|
+
|
|
14
|
+
// <div class="flex col@md row@lg">
|
|
15
|
+
// <!-- Changes direction based on breakpoint -->
|
|
16
|
+
// </div>
|
|
17
|
+
|
|
18
|
+
// @classes
|
|
19
|
+
// Base:
|
|
20
|
+
// - flex: Creates a flex container
|
|
21
|
+
|
|
22
|
+
// Direction:
|
|
23
|
+
// - row: Sets flex-direction to row
|
|
24
|
+
// - col: Sets flex-direction to column
|
|
25
|
+
// - row-reverse: Reverses row direction
|
|
26
|
+
// - col-reverse: Reverses column direction
|
|
27
|
+
|
|
28
|
+
// Alignment:
|
|
29
|
+
// - start/end/center: Controls justify-content
|
|
30
|
+
// - x-start/x-end/x-center: Controls align-items
|
|
31
|
+
|
|
32
|
+
// Child elements:
|
|
33
|
+
// - w-{1-12}: Sets width based on column count
|
|
34
|
+
// - grow: Allows item to grow
|
|
35
|
+
// - shrink/no-shrink: Controls shrink behavior
|
|
36
|
+
|
|
37
|
+
// @responsive
|
|
38
|
+
// All classes support responsive variants using @breakpoint suffix:
|
|
39
|
+
// - row@md: Row direction on medium screens and up
|
|
40
|
+
// - between@lg: Space-between on large screens
|
|
41
|
+
|
|
42
|
+
// @see grid
|
|
45
43
|
|
|
46
44
|
@use "sass:math";
|
|
47
45
|
@use "../utilities/media-queries" as MC;
|
|
48
46
|
@use "../abstracts/config" as VAR;
|
|
49
47
|
@use "../abstracts/functions" as FN;
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
* @description Establishes a flex container.
|
|
53
|
-
*/
|
|
49
|
+
// @description Establishes a flex container.
|
|
54
50
|
@mixin flex {
|
|
55
51
|
display: flex;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
* @description Establishes a flex-inline container.
|
|
60
|
-
*/
|
|
54
|
+
// @description Establishes a flex-inline container.
|
|
61
55
|
@mixin flex-inline {
|
|
62
56
|
display: inline-flex;
|
|
63
57
|
}
|
|
64
58
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
* @dependencies flex | flex-inline
|
|
68
|
-
*/
|
|
59
|
+
// @description Sets flex-direction to row.
|
|
60
|
+
// @dependencies flex | flex-inline
|
|
69
61
|
@mixin row {
|
|
70
62
|
flex-direction: row;
|
|
71
63
|
}
|
|
72
64
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
* @dependencies flex | flex-inline
|
|
76
|
-
*/
|
|
65
|
+
// @description Sets flex-direction to row-reverse.
|
|
66
|
+
// @dependencies flex | flex-inline
|
|
77
67
|
@mixin row-reverse {
|
|
78
68
|
flex-direction: row-reverse;
|
|
79
69
|
}
|
|
80
70
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
* @dependencies flex | flex-inline
|
|
84
|
-
*/
|
|
71
|
+
// @description Sets flex-direction to column.
|
|
72
|
+
// @dependencies flex | flex-inline
|
|
85
73
|
@mixin col {
|
|
86
74
|
flex-direction: column;
|
|
87
75
|
}
|
|
88
76
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* @dependencies flex | flex-inline
|
|
92
|
-
*/
|
|
77
|
+
// @description Sets flex-direction to column-reverse.
|
|
78
|
+
// @dependencies flex | flex-inline
|
|
93
79
|
@mixin col-reverse {
|
|
94
80
|
flex-direction: column-reverse;
|
|
95
81
|
}
|
|
96
82
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* @dependencies flex | flex-inline
|
|
100
|
-
*/
|
|
83
|
+
// @description Sets flex-wrap to wrap.
|
|
84
|
+
// @dependencies flex | flex-inline
|
|
101
85
|
@mixin wrap {
|
|
102
86
|
flex-wrap: wrap;
|
|
103
87
|
}
|
|
104
88
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
* @dependencies flex | flex-inline
|
|
108
|
-
*/
|
|
89
|
+
// @description Sets flex-wrap to nowrap.
|
|
90
|
+
// @dependencies flex | flex-inline
|
|
109
91
|
@mixin nowrap {
|
|
110
92
|
flex-wrap: nowrap;
|
|
111
93
|
}
|
|
112
94
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
* @dependencies flex | flex-inline
|
|
116
|
-
*/
|
|
95
|
+
// @description Sets flex-wrap to wrap-reverse
|
|
96
|
+
// @dependencies flex | flex-inline
|
|
117
97
|
@mixin wrap-reverse {
|
|
118
98
|
flex-wrap: wrap-reverse;
|
|
119
99
|
}
|
|
120
100
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
* @dependencies flex | flex-inline
|
|
124
|
-
*/
|
|
101
|
+
// @description Sets justify-content to flex-start
|
|
102
|
+
// @dependencies flex | flex-inline
|
|
125
103
|
@mixin start {
|
|
126
104
|
justify-content: flex-start;
|
|
127
105
|
}
|
|
128
106
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
* @dependencies flex | flex-inline
|
|
132
|
-
*/
|
|
107
|
+
// @description Sets justify-content to flex-end
|
|
108
|
+
// @dependencies flex | flex-inline
|
|
133
109
|
@mixin end {
|
|
134
110
|
justify-content: flex-end;
|
|
135
111
|
}
|
|
136
112
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
* @dependencies flex | flex-inline
|
|
140
|
-
*/
|
|
113
|
+
// @description Sets justify-content to center
|
|
114
|
+
// @dependencies flex | flex-inline
|
|
141
115
|
@mixin center {
|
|
142
116
|
justify-content: center;
|
|
143
117
|
}
|
|
144
118
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
* @dependencies flex | flex-inline
|
|
148
|
-
*/
|
|
119
|
+
// @description Sets justify-content to stretch
|
|
120
|
+
// @dependencies flex | flex-inline
|
|
149
121
|
@mixin stretch {
|
|
150
122
|
justify-content: stretch;
|
|
151
123
|
}
|
|
152
124
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
* @dependencies flex | flex-inline
|
|
156
|
-
*/
|
|
125
|
+
// @description Sets justify-content to space-between
|
|
126
|
+
// @dependencies flex | flex-inline
|
|
157
127
|
@mixin between {
|
|
158
128
|
justify-content: space-between;
|
|
159
129
|
}
|
|
160
130
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
* @dependencies flex | flex-inline
|
|
164
|
-
*/
|
|
131
|
+
// @description Sets justify-content to space-around
|
|
132
|
+
// @dependencies flex | flex-inline
|
|
165
133
|
@mixin around {
|
|
166
134
|
justify-content: space-around;
|
|
167
135
|
}
|
|
168
136
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
* @dependencies flex | flex-inline
|
|
172
|
-
*/
|
|
137
|
+
// @description Sets justify-content to space-evenly
|
|
138
|
+
// @dependencies flex | flex-inline
|
|
173
139
|
@mixin evenly {
|
|
174
140
|
justify-content: space-evenly;
|
|
175
141
|
}
|
|
176
142
|
|
|
177
143
|
// Cross Axis Alignment Mixins
|
|
178
144
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
* @dependencies flex | flex-inline
|
|
182
|
-
*/
|
|
145
|
+
// @description Sets align-items to flex-start - aligns items to the start of the cross axis.
|
|
146
|
+
// @dependencies flex | flex-inline
|
|
183
147
|
@mixin x-start {
|
|
184
148
|
align-items: flex-start;
|
|
185
149
|
}
|
|
186
150
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
* @dependencies flex | flex-inline
|
|
190
|
-
*/
|
|
151
|
+
// @description Sets align-items to flex-end - aligns items to the end of the cross axis.
|
|
152
|
+
// @dependencies flex | flex-inline
|
|
191
153
|
@mixin x-end {
|
|
192
154
|
align-items: flex-end;
|
|
193
155
|
}
|
|
194
156
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
* @dependencies flex | flex-inline
|
|
198
|
-
*/
|
|
157
|
+
// @description Sets align-items to center - aligns items to the center of the cross axis.
|
|
158
|
+
// @dependencies flex | flex-inline
|
|
199
159
|
@mixin x-center {
|
|
200
160
|
align-items: center;
|
|
201
161
|
}
|
|
202
162
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
* @dependencies flex | flex-inline
|
|
206
|
-
*/
|
|
163
|
+
// @description Sets align-items to stretch - aligns items to the stretch of the cross axis.
|
|
164
|
+
// @dependencies flex | flex-inline
|
|
207
165
|
@mixin x-stretch {
|
|
208
166
|
align-items: stretch;
|
|
209
167
|
}
|
|
210
168
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
* @dependencies flex | flex-inline
|
|
214
|
-
*/
|
|
169
|
+
// @description Sets align-items to baseline - aligns items to the baseline of the cross axis.
|
|
170
|
+
// @dependencies flex | flex-inline
|
|
215
171
|
@mixin x-baseline {
|
|
216
172
|
align-items: baseline;
|
|
217
173
|
}
|
|
218
174
|
|
|
219
175
|
// Cross Axis Content Mixins
|
|
220
176
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
* @dependencies flex | flex-inline
|
|
224
|
-
*/
|
|
177
|
+
// @description Sets align-content to flex-start - aligns content to the start of the cross axis.
|
|
178
|
+
// @dependencies flex | flex-inline
|
|
225
179
|
@mixin x-content-start {
|
|
226
180
|
align-content: flex-start;
|
|
227
181
|
}
|
|
228
182
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
* @dependencies flex | flex-inline
|
|
232
|
-
*/
|
|
183
|
+
// @description Sets align-content to flex-end - aligns content to the end of the cross axis.
|
|
184
|
+
// @dependencies flex | flex-inline
|
|
233
185
|
@mixin x-content-end {
|
|
234
186
|
align-content: flex-end;
|
|
235
187
|
}
|
|
236
188
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
* @dependencies flex | flex-inline
|
|
240
|
-
*/
|
|
189
|
+
// @description Sets align-content to center - aligns content to the center of the cross axis.
|
|
190
|
+
// @dependencies flex | flex-inline
|
|
241
191
|
@mixin x-content-center {
|
|
242
192
|
align-content: center;
|
|
243
193
|
}
|
|
244
194
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
* @dependencies flex | flex-inline
|
|
248
|
-
*/
|
|
195
|
+
// @description Sets align-content to space-between - aligns content to the space between the cross axis.
|
|
196
|
+
// @dependencies flex | flex-inline
|
|
249
197
|
@mixin x-content-between {
|
|
250
198
|
align-content: space-between;
|
|
251
199
|
}
|
|
252
200
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
* @dependencies flex | flex-inline
|
|
256
|
-
*/
|
|
201
|
+
// @description Sets align-content to space-around - aligns content to the space around the cross axis.
|
|
202
|
+
// @dependencies flex | flex-inline
|
|
257
203
|
@mixin x-content-around {
|
|
258
204
|
align-content: space-around;
|
|
259
205
|
}
|
|
260
206
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
* @dependencies flex | flex-inline
|
|
264
|
-
*/
|
|
207
|
+
// @description Sets align-content to space-evenly - aligns content to the space evenly between the cross axis.
|
|
208
|
+
// @dependencies flex | flex-inline
|
|
265
209
|
@mixin x-content-evenly {
|
|
266
210
|
align-content: space-evenly;
|
|
267
211
|
}
|
|
268
212
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
* @dependencies flex | flex-inline
|
|
272
|
-
*/
|
|
213
|
+
// @description Sets align-content to stretch - aligns content to the stretch of the cross axis.
|
|
214
|
+
// @dependencies flex | flex-inline
|
|
273
215
|
@mixin x-content-stretch {
|
|
274
216
|
align-content: stretch;
|
|
275
217
|
}
|
|
276
218
|
|
|
277
219
|
// Self Alignment Mixins
|
|
278
220
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
* @dependencies flex | flex-inline
|
|
282
|
-
*/
|
|
221
|
+
// @description Sets align-self to auto
|
|
222
|
+
// @dependencies flex | flex-inline
|
|
283
223
|
@mixin self-auto {
|
|
284
224
|
align-self: auto;
|
|
285
225
|
}
|
|
286
226
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
* @dependencies flex | flex-inline
|
|
290
|
-
*/
|
|
227
|
+
// @description Sets align-self to flex-start
|
|
228
|
+
// @dependencies flex | flex-inline
|
|
291
229
|
@mixin self-start {
|
|
292
230
|
align-self: flex-start;
|
|
293
231
|
}
|
|
294
232
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
* @dependencies flex | flex-inline
|
|
298
|
-
*/
|
|
233
|
+
// @description Sets align-self to flex-end
|
|
234
|
+
// @dependencies flex | flex-inline
|
|
299
235
|
@mixin self-end {
|
|
300
236
|
align-self: flex-end;
|
|
301
237
|
}
|
|
302
238
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
* @dependencies flex | flex-inline
|
|
306
|
-
*/
|
|
239
|
+
// @description Sets align-self to center
|
|
240
|
+
// @dependencies flex | flex-inline
|
|
307
241
|
@mixin self-center {
|
|
308
242
|
align-self: center;
|
|
309
243
|
}
|
|
310
244
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
* @dependencies flex | flex-inline
|
|
314
|
-
*/
|
|
245
|
+
// @description Sets align-self to stretch
|
|
246
|
+
// @dependencies flex | flex-inline
|
|
315
247
|
@mixin self-stretch {
|
|
316
248
|
align-self: stretch;
|
|
317
249
|
}
|
|
318
250
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
* @dependencies flex | flex-inline
|
|
322
|
-
*/
|
|
251
|
+
// @description Sets align-self to baseline
|
|
252
|
+
// @dependencies flex | flex-inline
|
|
323
253
|
@mixin self-baseline {
|
|
324
254
|
align-self: baseline;
|
|
325
255
|
}
|
|
326
256
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
* @dependencies flex | flex-inline
|
|
330
|
-
*/
|
|
257
|
+
// @description Sets flex-shrink to 1 - allows the item to shrink.
|
|
258
|
+
// @dependencies flex | flex-inline
|
|
331
259
|
@mixin shrink {
|
|
332
260
|
flex-shrink: 1;
|
|
333
261
|
}
|
|
334
262
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
* @dependencies flex | flex-inline
|
|
338
|
-
*/
|
|
263
|
+
// @description Sets flex-shrink to 0 - prevents the item from shrinking.
|
|
264
|
+
// @dependencies flex | flex-inline
|
|
339
265
|
@mixin no-shrink {
|
|
340
266
|
flex-shrink: 0;
|
|
341
267
|
}
|
|
342
268
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
* @dependencies flex | flex-inline
|
|
346
|
-
*/
|
|
269
|
+
// @description Sets flex-shrink to 2 - allows the item to shrink twice as much as the other items.
|
|
270
|
+
// @dependencies flex | flex-inline
|
|
347
271
|
@mixin shrink-twice {
|
|
348
272
|
flex-shrink: 2;
|
|
349
273
|
}
|
|
350
274
|
|
|
351
275
|
// Flex Child Mixins
|
|
352
276
|
|
|
353
|
-
|
|
354
|
-
* @description Sets flex to 0 0 100%
|
|
355
|
-
*/
|
|
277
|
+
// @description Sets flex to 0 0 100%
|
|
356
278
|
@mixin fill-full {
|
|
357
279
|
flex: 0 0 100%;
|
|
358
280
|
}
|
|
359
281
|
|
|
360
|
-
|
|
361
|
-
* @description Sets flex to 1 1 auto - allows the item to grow and shrink.
|
|
362
|
-
*/
|
|
282
|
+
// @description Sets flex to 1 1 auto - allows the item to grow and shrink.
|
|
363
283
|
@mixin fill-auto {
|
|
364
284
|
flex: 1 1 auto;
|
|
365
285
|
}
|
|
366
286
|
|
|
367
|
-
|
|
368
|
-
* @description Sets flex to 1 1 0% - allows the item to grow but not shrink.
|
|
369
|
-
*/
|
|
287
|
+
// @description Sets flex to 1 1 0% - allows the item to grow but not shrink.
|
|
370
288
|
@mixin grow {
|
|
371
289
|
flex: 1 1 0%;
|
|
372
290
|
}
|
|
373
291
|
|
|
374
|
-
|
|
375
|
-
* @description Sets flex to none - prevents the item from growing.
|
|
376
|
-
*/
|
|
292
|
+
// @description Sets flex to none - prevents the item from growing.
|
|
377
293
|
@mixin no-grow {
|
|
378
294
|
flex: none;
|
|
379
295
|
}
|
|
380
296
|
|
|
381
|
-
|
|
382
|
-
* @description Sets flex to 1 0 auto - allows the item to grow but not shrink.
|
|
383
|
-
*/
|
|
297
|
+
// @description Sets flex to 1 0 auto - allows the item to grow but not shrink.
|
|
384
298
|
@mixin grow-only {
|
|
385
299
|
flex: 1 0 auto;
|
|
386
300
|
}
|
|
387
301
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
* @param {Number} $size - The number of columns to span.
|
|
391
|
-
*/
|
|
302
|
+
// @description Sets how many columns this would take using percentage of VAR.$column-count.
|
|
303
|
+
// @param {Number} $size - The number of columns to span.
|
|
392
304
|
@mixin fill($size) {
|
|
393
|
-
|
|
305
|
+
$percentage: math.percentage(math.div($size, VAR.$column-count));
|
|
306
|
+
|
|
307
|
+
$n: math.div(VAR.$column-count, $size); // How many items fit in a row
|
|
308
|
+
$gap-adjustment: calc(var(--flex-gap, 0px) * #{$n - 1} / #{$n});
|
|
309
|
+
|
|
310
|
+
// The width calculation accounts for the gap proportionally
|
|
311
|
+
flex: 0 0 calc(#{$percentage} - #{$gap-adjustment});
|
|
394
312
|
}
|
|
395
313
|
|
|
396
|
-
@if
|
|
314
|
+
@if FN.feature-enabled("flex") {
|
|
397
315
|
// Build flat selector list for all flex containers
|
|
398
316
|
$flex-selectors: "#{VAR.$parent-selector} .flex";
|
|
399
317
|
|