@nuvoui/core 1.1.8 → 1.2.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/README.md +90 -35
- package/dist/nuvoui.css +28531 -0
- package/dist/nuvoui.css.map +1 -0
- package/dist/nuvoui.min.css +2 -1
- package/dist/nuvoui.min.css.map +1 -0
- package/package.json +48 -27
- package/src/styles/abstracts/_config.scss +157 -0
- package/src/styles/abstracts/_functions.scss +81 -0
- package/src/styles/abstracts/_index.scss +2 -0
- package/src/styles/base/_base.scss +2 -2
- package/src/styles/base/_index.scss +2 -0
- package/src/styles/base/_reset.scss +8 -6
- package/src/styles/index.scss +11 -30
- package/src/styles/layouts/_container.scss +7 -23
- package/src/styles/layouts/_flex.scss +116 -113
- package/src/styles/layouts/_grid.scss +70 -100
- package/src/styles/layouts/_index.scss +3 -0
- package/src/styles/mixins-map.scss +1 -1515
- package/src/styles/themes/_index.scss +1 -0
- package/src/styles/themes/_theme.scss +175 -55
- package/src/styles/utilities/_alignment.scss +9 -7
- package/src/styles/utilities/_animations.scss +65 -61
- package/src/styles/utilities/_borders.scss +283 -18
- package/src/styles/utilities/_colors.scss +68 -49
- package/src/styles/utilities/_container-queries.scss +19 -18
- package/src/styles/utilities/_display.scss +59 -57
- package/src/styles/utilities/_helpers.scss +110 -108
- package/src/styles/utilities/_index.scss +19 -0
- package/src/styles/utilities/_media-queries.scss +68 -15
- package/src/styles/utilities/_opacity.scss +51 -27
- package/src/styles/utilities/_position.scss +38 -37
- package/src/styles/utilities/_shadows.scss +195 -137
- package/src/styles/utilities/_sizing.scss +74 -71
- package/src/styles/utilities/_spacing.scss +117 -99
- package/src/styles/utilities/_tooltips.scss +153 -105
- package/src/styles/utilities/_transitions.scss +77 -73
- package/src/styles/utilities/_typography.scss +23 -26
- package/src/styles/utilities/_functions.scss +0 -84
- package/src/styles/utilities/_variables.scss +0 -126
|
@@ -1,29 +1,294 @@
|
|
|
1
|
-
//
|
|
1
|
+
// _borders.scss
|
|
2
|
+
// Border utility classes for NuvoUI
|
|
2
3
|
|
|
3
4
|
@use 'sass:math';
|
|
4
|
-
@use '
|
|
5
|
+
@use 'sass:map';
|
|
6
|
+
@use '../abstracts' as *;
|
|
5
7
|
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
// -----------------------------------------------
|
|
9
|
+
// MIXINS
|
|
10
|
+
// -----------------------------------------------
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
// Core Border Mixins - improved to include style and color by default
|
|
13
|
+
@mixin border($val) {
|
|
14
|
+
$val: if($val == 0, $val, $val + px);
|
|
15
|
+
|
|
16
|
+
border-width: $val;
|
|
17
|
+
@if $val != 0 {
|
|
18
|
+
border-style: solid; // Apply solid style by default when width > 0
|
|
19
|
+
border-color: var(--border, var(--border)); // Apply default color
|
|
20
|
+
}
|
|
21
|
+
}
|
|
12
22
|
|
|
13
|
-
@
|
|
14
|
-
|
|
23
|
+
@mixin border-top($val) {
|
|
24
|
+
$val: if($val == 0, $val, $val + px);
|
|
25
|
+
|
|
26
|
+
border-top-width: $val;
|
|
27
|
+
@if $val != 0 {
|
|
28
|
+
border-top-style: solid;
|
|
29
|
+
border-top-color: var(--border, var(--border));
|
|
30
|
+
}
|
|
15
31
|
}
|
|
16
32
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.pill { @include rounded(9999px); }
|
|
33
|
+
@mixin border-right($val) {
|
|
34
|
+
$val: if($val == 0, $val, $val + px);
|
|
20
35
|
|
|
21
|
-
|
|
22
|
-
@
|
|
36
|
+
border-right-width: $val;
|
|
37
|
+
@if $val != 0 {
|
|
38
|
+
border-right-style: solid;
|
|
39
|
+
border-right-color: var(--border, var(--border));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin border-bottom($val) {
|
|
44
|
+
$val: if($val == 0, $val, $val + px);
|
|
45
|
+
|
|
46
|
+
border-bottom-width: $val;
|
|
47
|
+
@if $val != 0 {
|
|
48
|
+
border-bottom-style: solid;
|
|
49
|
+
border-bottom-color: var(--border, var(--border));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@mixin border-left($val) {
|
|
54
|
+
$val: if($val == 0, $val, $val + px);
|
|
55
|
+
|
|
56
|
+
border-left-width: $val;
|
|
57
|
+
@if $val != 0 {
|
|
58
|
+
border-left-style: solid;
|
|
59
|
+
border-left-color: var(--border, var(--border));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Border Radius Mixins
|
|
64
|
+
@mixin rounded($val: map.get($border-radii, 'md')) {
|
|
65
|
+
border-radius: $val;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@mixin rounded-t($val) {
|
|
69
|
+
border-top-left-radius: $val;
|
|
70
|
+
border-top-right-radius: $val;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@mixin rounded-r($val) {
|
|
74
|
+
border-top-right-radius: $val;
|
|
75
|
+
border-bottom-right-radius: $val;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@mixin rounded-b($val) {
|
|
79
|
+
border-bottom-left-radius: $val;
|
|
80
|
+
border-bottom-right-radius: $val;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin rounded-l($val) {
|
|
84
|
+
border-top-left-radius: $val;
|
|
85
|
+
border-bottom-left-radius: $val;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@mixin rounded-tl($val) { border-top-left-radius: $val; }
|
|
89
|
+
@mixin rounded-tr($val) { border-top-right-radius: $val; }
|
|
90
|
+
@mixin rounded-br($val) { border-bottom-right-radius: $val; }
|
|
91
|
+
@mixin rounded-bl($val) { border-bottom-left-radius: $val; }
|
|
92
|
+
|
|
93
|
+
// Border Style and Color
|
|
94
|
+
@mixin border-style($style) { border-style: $style; }
|
|
95
|
+
@mixin border-color($color) { border-color: $color; }
|
|
96
|
+
|
|
97
|
+
// Combined border properties
|
|
98
|
+
@mixin border-all($width, $style, $color) {
|
|
99
|
+
border-width: $width;
|
|
100
|
+
border-style: $style;
|
|
101
|
+
border-color: $color;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// -----------------------------------------------
|
|
105
|
+
// VARIABLES
|
|
106
|
+
// -----------------------------------------------
|
|
107
|
+
|
|
108
|
+
// Common border width values that are most useful
|
|
109
|
+
$border-widths: (0, 1, 2, 4, 8);
|
|
110
|
+
|
|
111
|
+
// Common border radius values that are most useful
|
|
112
|
+
$border-radii: (
|
|
113
|
+
'xs': 0.25rem,
|
|
114
|
+
'sm': 0.375rem,
|
|
115
|
+
'md': 0.5rem,
|
|
116
|
+
'lg': 0.75rem,
|
|
117
|
+
'xl': 1rem,
|
|
118
|
+
'2xl': 1.25rem,
|
|
119
|
+
'full': 9999px,
|
|
120
|
+
'none': 0
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// Common border styles
|
|
124
|
+
$border-styles: (solid, dashed, dotted, double, none);
|
|
125
|
+
|
|
126
|
+
// -----------------------------------------------
|
|
127
|
+
// UTILITY CLASSES
|
|
128
|
+
// -----------------------------------------------
|
|
129
|
+
@if $generate-utility-classes {
|
|
130
|
+
// Basic border classes (all sides)
|
|
131
|
+
.border { @include border(1); }
|
|
132
|
+
.border-0 { @include border(0); }
|
|
133
|
+
|
|
134
|
+
// All sides border width
|
|
135
|
+
@each $width in $border-widths {
|
|
136
|
+
.border-#{$width} { @include border($width); }
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Directional border width
|
|
140
|
+
@each $width in $border-widths {
|
|
141
|
+
.border-t-#{$width} { @include border-top($width); }
|
|
142
|
+
.border-r-#{$width} { @include border-right($width); }
|
|
143
|
+
.border-b-#{$width} { @include border-bottom($width); }
|
|
144
|
+
.border-l-#{$width} { @include border-left($width); }
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Common shortcuts for single-side borders
|
|
148
|
+
.border-t { @include border-top(1); }
|
|
149
|
+
.border-r { @include border-right(1); }
|
|
150
|
+
.border-b { @include border-bottom(1); }
|
|
151
|
+
.border-l { @include border-left(1); }
|
|
152
|
+
|
|
153
|
+
// Border radius classes
|
|
154
|
+
.rounded { @include rounded; } // Default rounded
|
|
155
|
+
.square { @include rounded(0); } // Alias for no radius
|
|
156
|
+
|
|
157
|
+
@each $name, $value in $border-radii {
|
|
158
|
+
.rounded-#{$name} { @include rounded($value); }
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Directional border radius
|
|
162
|
+
@each $name, $value in $border-radii {
|
|
163
|
+
.rounded-t-#{$name} { @include rounded-t($value); }
|
|
164
|
+
.rounded-r-#{$name} { @include rounded-r($value); }
|
|
165
|
+
.rounded-b-#{$name} { @include rounded-b($value); }
|
|
166
|
+
.rounded-l-#{$name} { @include rounded-l($value); }
|
|
167
|
+
|
|
168
|
+
// Individual corners
|
|
169
|
+
.rounded-tl-#{$name} { @include rounded-tl($value); }
|
|
170
|
+
.rounded-tr-#{$name} { @include rounded-tr($value); }
|
|
171
|
+
.rounded-br-#{$name} { @include rounded-br($value); }
|
|
172
|
+
.rounded-bl-#{$name} { @include rounded-bl($value); }
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Pill shape (alias for full radius)
|
|
176
|
+
.pill { @include rounded(9999px); }
|
|
177
|
+
|
|
178
|
+
// Border styles - these override the default solid style if needed
|
|
179
|
+
@each $style in $border-styles {
|
|
180
|
+
.border-#{$style} { @include border-style($style); }
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Border colors - these override the default color if needed
|
|
184
|
+
.border-default { @include border-color(var(--border)); }
|
|
185
|
+
.border-light { @include border-color(var(--border-light-color)); }
|
|
186
|
+
.border-dark { @include border-color(var(--border-dark-color)); }
|
|
187
|
+
.border-primary { @include border-color(var(--primary)); }
|
|
188
|
+
.border-secondary { @include border-color(var(--secondary)); }
|
|
189
|
+
.border-success { @include border-color(var(--success)); }
|
|
190
|
+
.border-danger { @include border-color(var(--danger)); }
|
|
191
|
+
.border-warning { @include border-color(var(--warning)); }
|
|
192
|
+
.border-info { @include border-color(var(--info)); }
|
|
193
|
+
|
|
194
|
+
// Common combined border utilities (style + color)
|
|
195
|
+
.border-primary-solid {
|
|
196
|
+
@include border-style(solid);
|
|
197
|
+
@include border-color(var(--primary));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.border-danger-dashed {
|
|
201
|
+
@include border-style(dashed);
|
|
202
|
+
@include border-color(var(--danger));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// -----------------------------------------------
|
|
206
|
+
// HOVER, ACTIVE, AND FOCUS STATES
|
|
207
|
+
// -----------------------------------------------
|
|
208
|
+
|
|
209
|
+
// Hover state border classes
|
|
210
|
+
@each $width in $border-widths {
|
|
211
|
+
.hover\:border-#{$width}:hover { @include border($width); }
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@each $style in $border-styles {
|
|
215
|
+
.hover\:border-#{$style}:hover { @include border-style($style); }
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Border colors on hover
|
|
219
|
+
.hover\:border-default:hover { @include border-color(var(--border)); }
|
|
220
|
+
.hover\:border-light:hover { @include border-color(var(--border-light-color)); }
|
|
221
|
+
.hover\:border-dark:hover { @include border-color(var(--border-dark-color)); }
|
|
222
|
+
.hover\:border-primary:hover { @include border-color(var(--primary)); }
|
|
223
|
+
.hover\:border-secondary:hover { @include border-color(var(--secondary)); }
|
|
224
|
+
.hover\:border-success:hover { @include border-color(var(--success)); }
|
|
225
|
+
.hover\:border-danger:hover { @include border-color(var(--danger)); }
|
|
226
|
+
.hover\:border-warning:hover { @include border-color(var(--warning)); }
|
|
227
|
+
.hover\:border-info:hover { @include border-color(var(--info)); }
|
|
228
|
+
|
|
229
|
+
// Active state border classes
|
|
230
|
+
@each $width in $border-widths {
|
|
231
|
+
.active\:border-#{$width}:active { @include border($width); }
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@each $style in $border-styles {
|
|
235
|
+
.active\:border-#{$style}:active { @include border-style($style); }
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Border colors on active state
|
|
239
|
+
.active\:border-default:active { @include border-color(var(--border)); }
|
|
240
|
+
.active\:border-light:active { @include border-color(var(--border-light-color)); }
|
|
241
|
+
.active\:border-dark:active { @include border-color(var(--border-dark-color)); }
|
|
242
|
+
.active\:border-primary:active { @include border-color(var(--primary)); }
|
|
243
|
+
.active\:border-secondary:active { @include border-color(var(--secondary)); }
|
|
244
|
+
.active\:border-success:active { @include border-color(var(--success)); }
|
|
245
|
+
.active\:border-danger:active { @include border-color(var(--danger)); }
|
|
246
|
+
.active\:border-warning:active { @include border-color(var(--warning)); }
|
|
247
|
+
.active\:border-info:active { @include border-color(var(--info)); }
|
|
248
|
+
|
|
249
|
+
// Focus state border classes
|
|
250
|
+
@each $width in $border-widths {
|
|
251
|
+
.focus\:border-#{$width}:focus { @include border($width); }
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
@each $style in $border-styles {
|
|
255
|
+
.focus\:border-#{$style}:focus { @include border-style($style); }
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Border colors on focus
|
|
259
|
+
.focus\:border-default:focus { @include border-color(var(--border)); }
|
|
260
|
+
.focus\:border-light:focus { @include border-color(var(--border-light-color)); }
|
|
261
|
+
.focus\:border-dark:focus { @include border-color(var(--border-dark-color)); }
|
|
262
|
+
.focus\:border-primary:focus { @include border-color(var(--primary)); }
|
|
263
|
+
.focus\:border-secondary:focus { @include border-color(var(--secondary)); }
|
|
264
|
+
.focus\:border-success:focus { @include border-color(var(--success)); }
|
|
265
|
+
.focus\:border-danger:focus { @include border-color(var(--danger)); }
|
|
266
|
+
.focus\:border-warning:focus { @include border-color(var(--warning)); }
|
|
267
|
+
.focus\:border-info:focus { @include border-color(var(--info)); }
|
|
268
|
+
|
|
269
|
+
// -----------------------------------------------
|
|
270
|
+
// RESPONSIVE CLASSES
|
|
271
|
+
// -----------------------------------------------
|
|
272
|
+
|
|
273
|
+
@each $breakpoint, $width in $breakpoints {
|
|
23
274
|
@media (min-width: #{$width}) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
275
|
+
// Border width responsive
|
|
276
|
+
@each $val in $border-widths {
|
|
277
|
+
.border-#{$val}\@#{$breakpoint} { @include border($val); }
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Common shortcuts for responsive
|
|
281
|
+
.border\@#{$breakpoint} { @include border(1); }
|
|
282
|
+
.border-0\@#{$breakpoint} { @include border(0); }
|
|
283
|
+
|
|
284
|
+
// Border radius responsive
|
|
285
|
+
@each $name, $value in $border-radii {
|
|
286
|
+
.rounded-#{$name}\@#{$breakpoint} { @include rounded($value); }
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.rounded\@#{$breakpoint} { @include rounded; }
|
|
290
|
+
.square\@#{$breakpoint} { @include rounded(0); }
|
|
291
|
+
.pill\@#{$breakpoint} { @include rounded(9999px); }
|
|
28
292
|
}
|
|
293
|
+
}
|
|
29
294
|
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
// _colors.scss - Color functions and scale generation
|
|
1
2
|
@use "sass:math";
|
|
2
3
|
@use 'sass:color';
|
|
3
4
|
@use 'sass:map';
|
|
4
5
|
@use 'sass:meta';
|
|
5
6
|
@use 'sass:list';
|
|
6
7
|
|
|
7
|
-
@use '
|
|
8
|
+
@use '../abstracts' as *;
|
|
8
9
|
|
|
9
10
|
// Color Validation
|
|
10
11
|
@function is-valid-color($color) {
|
|
11
12
|
@return meta.type-of($color) == 'color';
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
// Scale Generation Function
|
|
14
16
|
@function create-color-scale($color) {
|
|
15
17
|
$scale: ();
|
|
16
18
|
$stops: (
|
|
@@ -25,62 +27,61 @@
|
|
|
25
27
|
800: 25%,
|
|
26
28
|
900: 15%
|
|
27
29
|
);
|
|
28
|
-
|
|
29
|
-
@each $
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
|
|
31
|
+
@each $shade, $lightness in $stops {
|
|
32
|
+
$adjusted-color: $color;
|
|
33
|
+
|
|
34
|
+
@if $shade < 500 {
|
|
35
|
+
// Lighter shades: mix with white
|
|
36
|
+
$mix-percentage: math.div($lightness - 50%, 50%) * 100%;
|
|
37
|
+
$adjusted-color: color.mix(white, $color, $mix-percentage);
|
|
38
|
+
} @else if $shade > 500 {
|
|
39
|
+
// Darker shades: mix with black
|
|
40
|
+
$mix-percentage: math.div(50% - $lightness, 50%) * 100%;
|
|
41
|
+
$adjusted-color: color.mix(black, $color, $mix-percentage);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
$scale: map.set($scale, $shade, $adjusted-color);
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
@return $scale;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// Color Relationship Functions
|
|
45
|
-
@function find-text-color($color) {
|
|
46
|
-
$luminance: luminance($color);
|
|
47
|
-
@return if($luminance > 0.55, #000, #fff);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
// Luminance
|
|
50
|
+
// Luminance calculation for contrast
|
|
51
51
|
@function luminance($color) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
$red: math.div(color.channel($color, "red"), 255);
|
|
53
|
+
$green: math.div(color.channel($color, "green"), 255);
|
|
54
|
+
$blue: math.div(color.channel($color, "blue"), 255);
|
|
55
55
|
|
|
56
|
-
$
|
|
57
|
-
$
|
|
58
|
-
$
|
|
56
|
+
$red: if($red <= 0.0393, math.div($red, 12.92), math.pow((math.div($red + 0.055, 1.055)), 2.4));
|
|
57
|
+
$green: if($green <= 0.0393, math.div($green, 12.92), math.pow((math.div($green + 0.055, 1.055)), 2.4));
|
|
58
|
+
$blue: if($blue <= 0.0393, math.div($blue, 12.92), math.pow((math.div($blue + 0.055, 1.055)), 2.4));
|
|
59
59
|
|
|
60
|
-
@return
|
|
60
|
+
@return 0.2126 * $red + 0.7152 * $green + 0.0722 * $blue;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Find appropriate text color for a background
|
|
64
|
+
@function find-text-color($background) {
|
|
65
|
+
$luminance: luminance($background);
|
|
66
|
+
@return if($luminance > 0.55, #000, #fff);
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
//
|
|
69
|
+
// Adaptive contrast mixin
|
|
64
70
|
@mixin adaptive-contrast($color) {
|
|
65
|
-
background: $color;
|
|
71
|
+
background-color: $color;
|
|
66
72
|
color: find-text-color($color);
|
|
67
73
|
|
|
68
74
|
@media (prefers-contrast: more) {
|
|
69
|
-
$
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Filter Mixins
|
|
76
|
-
@mixin backdrop-filter($value) {
|
|
77
|
-
backdrop-filter: $value;
|
|
78
|
-
}
|
|
75
|
+
$adjusted: if(color.lightness($color) > 50%,
|
|
76
|
+
color.adjust($color, $lightness: -10%),
|
|
77
|
+
color.adjust($color, $lightness: 10%));
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
background-color: $adjusted;
|
|
80
|
+
color: find-text-color($adjusted);
|
|
81
|
+
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
// Generate color scales
|
|
84
85
|
$colors: (
|
|
85
86
|
'primary': create-color-scale($primary),
|
|
86
87
|
'secondary': create-color-scale($secondary),
|
|
@@ -88,17 +89,35 @@ $colors: (
|
|
|
88
89
|
'danger': create-color-scale($danger),
|
|
89
90
|
'warning': create-color-scale($warning),
|
|
90
91
|
'info': create-color-scale($info)
|
|
91
|
-
);
|
|
92
|
+
);
|
|
92
93
|
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
@include backdrop-filter(blur(10px));
|
|
94
|
+
// Generate scales for primitives
|
|
95
|
+
$colors-primitives: ();
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
@each $name, $color in $color-primitives {
|
|
98
|
+
$colors-primitives: map.set($colors-primitives, $name, create-color-scale($color));
|
|
98
99
|
}
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
// todo: documentation
|
|
102
|
+
@mixin bg($color) {
|
|
103
|
+
& {
|
|
104
|
+
background-color: $color;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
@mixin color($color) {
|
|
108
|
+
& {
|
|
109
|
+
color: $color;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
@mixin gradient($direction, $colors...) {
|
|
113
|
+
background-image: linear-gradient($direction, $colors);
|
|
104
114
|
}
|
|
115
|
+
|
|
116
|
+
// Filter Mixins
|
|
117
|
+
@mixin backdrop-filter($value) {
|
|
118
|
+
backdrop-filter: $value;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@mixin filter($value) {
|
|
122
|
+
filter: $value;
|
|
123
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:meta";
|
|
3
|
+
@use "../abstracts" as *;
|
|
4
|
+
@use "../abstracts/functions" as FN;
|
|
5
|
+
|
|
6
6
|
/**
|
|
7
7
|
* Container Query Mixins
|
|
8
8
|
*
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
@mixin container-only($breakpoint, $containerName: null) {
|
|
49
49
|
$min: FN.get-breakpoint-value($breakpoint);
|
|
50
50
|
$next-breakpoint: null;
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
@each $name, $width in $breakpoints {
|
|
53
53
|
@if $width > $min and (not $next-breakpoint or $width < $next-breakpoint) {
|
|
54
54
|
$next-breakpoint: $width;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
@if $next-breakpoint {
|
|
59
59
|
@container #{$containerName} (min-width: #{$min}) and (max-width: (#{ $next-breakpoint } - 0.02px)) {
|
|
60
60
|
@content;
|
|
@@ -81,18 +81,19 @@
|
|
|
81
81
|
container-name: $name;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
@if $generate-utility-classes {
|
|
85
|
+
// Utility classes
|
|
86
|
+
.container-inline-size {
|
|
87
|
+
container-type: inline-size;
|
|
88
|
+
}
|
|
84
89
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.container-size {
|
|
91
|
-
container-type: size;
|
|
92
|
-
}
|
|
90
|
+
.container-size {
|
|
91
|
+
container-type: size;
|
|
92
|
+
}
|
|
93
93
|
|
|
94
|
-
@each $name in (
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
@each $name in ("main", "sidebar", "card", "section") {
|
|
95
|
+
.container-#{$name} {
|
|
96
|
+
container-name: $name;
|
|
97
|
+
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Section: Utilities
|
|
2
2
|
// Module: Display
|
|
3
3
|
|
|
4
|
-
@use '
|
|
5
|
-
@use '
|
|
4
|
+
@use '../abstracts' as *;
|
|
5
|
+
@use '../abstracts/functions' as FN;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Display Utilities
|
|
@@ -77,61 +77,63 @@
|
|
|
77
77
|
@mixin overflow-y-auto { overflow-y: auto; }
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
.
|
|
83
|
-
.
|
|
84
|
-
.
|
|
85
|
-
.inline
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
.
|
|
89
|
-
.
|
|
90
|
-
.
|
|
91
|
-
.overflow-
|
|
92
|
-
.overflow-
|
|
93
|
-
.overflow-
|
|
94
|
-
.overflow-
|
|
95
|
-
.overflow-
|
|
96
|
-
.overflow-
|
|
97
|
-
.overflow-
|
|
98
|
-
.overflow-
|
|
99
|
-
.overflow-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
@
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
80
|
+
@if $generate-utility-classes {
|
|
81
|
+
// Base Classes
|
|
82
|
+
.hide { @include hide; }
|
|
83
|
+
.show { @include show; }
|
|
84
|
+
.block { @include block; }
|
|
85
|
+
.inline { @include inline; }
|
|
86
|
+
.inline-block { @include inline-block; }
|
|
87
|
+
.visible { @include visible; }
|
|
88
|
+
.invisible { @include invisible; }
|
|
89
|
+
.collapse { @include collapse; }
|
|
90
|
+
.contents { @include contents; }
|
|
91
|
+
.overflow-hidden { @include overflow-hidden; }
|
|
92
|
+
.overflow-visible { @include overflow-visible; }
|
|
93
|
+
.overflow-scroll { @include overflow-scroll; }
|
|
94
|
+
.overflow-auto { @include overflow-auto; }
|
|
95
|
+
.overflow-x-hidden { @include overflow-x-hidden; }
|
|
96
|
+
.overflow-y-hidden { @include overflow-y-hidden; }
|
|
97
|
+
.overflow-x-scroll { @include overflow-x-scroll; }
|
|
98
|
+
.overflow-y-scroll { @include overflow-y-scroll; }
|
|
99
|
+
.overflow-x-auto { @include overflow-x-auto; }
|
|
100
|
+
.overflow-y-auto { @include overflow-y-auto; }
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
.d {
|
|
104
|
+
&-tbl { @include d-tbl; }
|
|
105
|
+
&-tbl-row { @include d-tbl-row; }
|
|
106
|
+
&-tbl-cell { @include d-tbl-cell; }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Responsive Variants
|
|
110
|
+
@each $breakpoint, $width in $breakpoints {
|
|
111
|
+
@media (min-width: #{$width}) {
|
|
112
|
+
.hide\@#{$breakpoint} { @include hide; }
|
|
113
|
+
.show\@#{$breakpoint} { @include show; }
|
|
114
|
+
.block\@#{$breakpoint} { @include block; }
|
|
115
|
+
.inline\@#{$breakpoint} { @include inline; }
|
|
116
|
+
.inline-block\@#{$breakpoint} { @include inline-block; }
|
|
117
|
+
.visible\@#{$breakpoint} { @include visible; }
|
|
118
|
+
.invisible\@#{$breakpoint} { @include invisible; }
|
|
119
|
+
.collapse\@#{$breakpoint} { @include collapse; }
|
|
120
|
+
.contents\@#{$breakpoint} { @include contents; }
|
|
121
|
+
.overflow-hidden\@#{$breakpoint} { @include overflow-hidden; }
|
|
122
|
+
.overflow-visible\@#{$breakpoint} { @include overflow-visible; }
|
|
123
|
+
.overflow-scroll\@#{$breakpoint} { @include overflow-scroll; }
|
|
124
|
+
.overflow-auto\@#{$breakpoint} { @include overflow-auto; }
|
|
125
|
+
.overflow-x-hidden\@#{$breakpoint} { @include overflow-x-hidden; }
|
|
126
|
+
.overflow-y-hidden\@#{$breakpoint} { @include overflow-y-hidden; }
|
|
127
|
+
.overflow-x-scroll\@#{$breakpoint} { @include overflow-x-scroll; }
|
|
128
|
+
.overflow-y-scroll\@#{$breakpoint} { @include overflow-y-scroll; }
|
|
129
|
+
.overflow-x-auto\@#{$breakpoint} { @include overflow-x-auto; }
|
|
130
|
+
.overflow-y-auto\@#{$breakpoint} { @include overflow-y-auto; }
|
|
131
|
+
|
|
132
|
+
.d {
|
|
133
|
+
&-tbl\@#{$breakpoint} { @include d-tbl; }
|
|
134
|
+
&-tbl-row\@#{$breakpoint} { @include d-tbl-row; }
|
|
135
|
+
&-tbl-cell\@#{$breakpoint} { @include d-tbl-cell; }
|
|
136
|
+
}
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
}
|