@nuvoui/core 1.2.5 → 1.2.6
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 +2 -2
- package/dist/nuvoui.css +21899 -22748
- 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 +81 -47
- package/src/styles/abstracts/_functions.scss +21 -61
- package/src/styles/base/_base.scss +67 -59
- package/src/styles/base/_reset.scss +11 -8
- package/src/styles/index.scss +28 -10
- package/src/styles/layouts/_container.scss +1 -2
- package/src/styles/layouts/_flex.scss +442 -154
- package/src/styles/layouts/_grid.scss +145 -75
- package/src/styles/mixins-map.scss +1085 -1
- package/src/styles/themes/_theme.scss +127 -91
- package/src/styles/utilities/_alignment.scss +40 -13
- package/src/styles/utilities/_animations.scss +165 -105
- package/src/styles/utilities/_backdrop-filters.scss +111 -83
- package/src/styles/utilities/_borders.scss +329 -143
- package/src/styles/utilities/_colors.scss +24 -25
- package/src/styles/utilities/_container-queries.scss +7 -7
- package/src/styles/utilities/_cursor.scss +10 -17
- package/src/styles/utilities/_display.scss +234 -85
- package/src/styles/utilities/_helpers.scss +5 -5
- package/src/styles/utilities/_media-queries.scss +24 -27
- package/src/styles/utilities/_opacity.scss +15 -31
- package/src/styles/utilities/_position.scss +129 -66
- package/src/styles/utilities/_shadows.scss +23 -29
- package/src/styles/utilities/_sizing.scss +269 -108
- package/src/styles/utilities/_spacing.scss +254 -156
- package/src/styles/utilities/_tooltips.scss +35 -31
- package/src/styles/utilities/_transforms.scss +179 -156
- package/src/styles/utilities/_transitions.scss +134 -68
- package/src/styles/utilities/_typography.scss +341 -127
- package/src/styles/utilities/_z-index.scss +79 -49
- package/src/styles/abstracts/_index.scss +0 -1
- package/src/styles/base/_index.scss +0 -2
- package/src/styles/layouts/_index.scss +0 -3
- package/src/styles/themes/_index.scss +0 -1
- package/src/styles/utilities/_index.scss +0 -23
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
// _colors.scss - Color functions and scale generation
|
|
2
2
|
@use "sass:math";
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
6
|
-
@use
|
|
3
|
+
@use "sass:color";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "sass:meta";
|
|
6
|
+
@use "sass:list";
|
|
7
7
|
|
|
8
|
-
@use
|
|
8
|
+
@use "../abstracts/config" as *;
|
|
9
9
|
|
|
10
10
|
// Color Validation
|
|
11
11
|
@function is-valid-color($color) {
|
|
12
|
-
@return meta.type-of($color) ==
|
|
12
|
+
@return meta.type-of($color) == "color";
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// Scale Generation Function
|
|
16
16
|
@function create-color-scale($color) {
|
|
17
17
|
$scale: ();
|
|
18
18
|
$stops: (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
50: 95%,
|
|
20
|
+
100: 85%,
|
|
21
|
+
200: 75%,
|
|
22
|
+
300: 65%,
|
|
23
|
+
400: 55%,
|
|
24
|
+
500: 50%,
|
|
25
|
+
// Base color
|
|
26
|
+
600: 45%,
|
|
27
|
+
700: 35%,
|
|
28
|
+
800: 25%,
|
|
29
|
+
900: 15%,
|
|
29
30
|
);
|
|
30
31
|
|
|
31
32
|
@each $shade, $lightness in $stops {
|
|
@@ -72,9 +73,7 @@
|
|
|
72
73
|
color: find-text-color($color);
|
|
73
74
|
|
|
74
75
|
@media (prefers-contrast: more) {
|
|
75
|
-
$adjusted: if(color.lightness($color) > 50%,
|
|
76
|
-
color.adjust($color, $lightness: -10%),
|
|
77
|
-
color.adjust($color, $lightness: 10%));
|
|
76
|
+
$adjusted: if(color.lightness($color) > 50%, color.adjust($color, $lightness: -10%), color.adjust($color, $lightness: 10%));
|
|
78
77
|
|
|
79
78
|
background-color: $adjusted;
|
|
80
79
|
color: find-text-color($adjusted);
|
|
@@ -83,12 +82,12 @@
|
|
|
83
82
|
|
|
84
83
|
// Generate color scales
|
|
85
84
|
$colors: (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
"primary": create-color-scale($primary),
|
|
86
|
+
"secondary": create-color-scale($secondary),
|
|
87
|
+
"success": create-color-scale($success),
|
|
88
|
+
"danger": create-color-scale($danger),
|
|
89
|
+
"warning": create-color-scale($warning),
|
|
90
|
+
"info": create-color-scale($info),
|
|
92
91
|
);
|
|
93
92
|
|
|
94
93
|
// Generate scales for primitives
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "sass:meta";
|
|
3
|
-
@use "../abstracts" as
|
|
3
|
+
@use "../abstracts/config" as VAR;
|
|
4
4
|
@use "../abstracts/functions" as FN;
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
/**
|
|
7
7
|
* Container Query Mixins
|
|
8
8
|
*
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
container-name: $name;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
@if
|
|
84
|
+
@if VAR.$generate-utility-classes {
|
|
85
85
|
// Utility classes
|
|
86
|
-
.container-inline-size {
|
|
86
|
+
#{VAR.$parent-selector} .container-inline-size {
|
|
87
87
|
container-type: inline-size;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.container-size {
|
|
90
|
+
#{VAR.$parent-selector} .container-size {
|
|
91
91
|
container-type: size;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
@each $name in ("main", "sidebar", "card", "section") {
|
|
95
|
-
.container-#{$name} {
|
|
95
|
+
#{VAR.$parent-selector} .container-#{$name} {
|
|
96
96
|
container-name: $name;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
}
|
|
99
|
+
}
|
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "../abstracts/config" as VAR;
|
|
2
2
|
|
|
3
3
|
@mixin cursor($cursor-value) {
|
|
4
|
-
cursor: $cursor-value;
|
|
4
|
+
cursor: #{$cursor-value};
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
@if VAR.$generate-utility-classes {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.cursor-cell { @include cursor(cell); }
|
|
17
|
-
.cursor-crosshair { @include cursor(crosshair); }
|
|
18
|
-
.cursor-grabbing { @include cursor(grabbing); }
|
|
19
|
-
.cursor-grab { @include cursor(grab); }
|
|
20
|
-
.cursor-zoom-in { @include cursor(zoom-in); }
|
|
21
|
-
.cursor-zoom-out { @include cursor(zoom-out); }
|
|
22
|
-
.cursor-none { @include cursor(none); }
|
|
8
|
+
$cursor-values: ("auto", "pointer", "default", "move", "not-allowed", "wait", "help", "text", "cell", "crosshair", "grabbing", "grab", "zoom-in", "zoom-out", "none", "progress", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "context-menu", "all-scroll");
|
|
9
|
+
|
|
10
|
+
// Generate classes for each cursor value
|
|
11
|
+
@each $value in $cursor-values {
|
|
12
|
+
#{VAR.$parent-selector} .cursor-#{$value} {
|
|
13
|
+
@include cursor($value);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
23
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Section: Utilities
|
|
2
2
|
// Module: Display
|
|
3
3
|
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
4
|
+
@use "../abstracts/config" as VAR;
|
|
5
|
+
@use "../abstracts/functions" as FN;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Display Utilities
|
|
@@ -18,122 +18,271 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
// Display Mixins
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
/**
|
|
23
23
|
* @description Set display to none.
|
|
24
24
|
*/
|
|
25
|
-
@mixin hide {
|
|
25
|
+
@mixin hide {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
30
|
* @description Set display to block.
|
|
29
31
|
*/
|
|
30
|
-
@mixin block {
|
|
32
|
+
@mixin block {
|
|
33
|
+
display: block;
|
|
34
|
+
}
|
|
31
35
|
|
|
32
36
|
/**
|
|
33
37
|
* @description Set display to inline.
|
|
34
38
|
*/
|
|
35
|
-
@mixin inline {
|
|
39
|
+
@mixin inline {
|
|
40
|
+
display: inline;
|
|
41
|
+
}
|
|
36
42
|
|
|
37
43
|
/**
|
|
38
44
|
* @description Set display to inline-block.
|
|
39
45
|
*/
|
|
40
|
-
@mixin inline-block {
|
|
46
|
+
@mixin inline-block {
|
|
47
|
+
display: inline-block;
|
|
48
|
+
}
|
|
41
49
|
|
|
42
50
|
/**
|
|
43
51
|
* @description Set display to initial original state.
|
|
44
52
|
*/
|
|
45
|
-
@mixin show {
|
|
53
|
+
@mixin show {
|
|
54
|
+
display: revert;
|
|
55
|
+
}
|
|
46
56
|
|
|
47
57
|
/**
|
|
48
58
|
* @description Set display to table.
|
|
49
59
|
*/
|
|
50
|
-
@mixin d-tbl {
|
|
60
|
+
@mixin d-tbl {
|
|
61
|
+
display: table;
|
|
62
|
+
}
|
|
51
63
|
|
|
52
64
|
/**
|
|
53
65
|
* @description Set display to table-row.
|
|
54
66
|
*/
|
|
55
|
-
@mixin d-tbl-row {
|
|
67
|
+
@mixin d-tbl-row {
|
|
68
|
+
display: table-row;
|
|
69
|
+
}
|
|
56
70
|
|
|
57
71
|
/**
|
|
58
72
|
* @description Set display to table-cell.
|
|
59
73
|
*/
|
|
60
|
-
@mixin d-tbl-cell {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@mixin
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@mixin
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@mixin
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
@mixin overflow-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
@
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
74
|
+
@mixin d-tbl-cell {
|
|
75
|
+
display: table-cell;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@mixin visible {
|
|
79
|
+
visibility: visible;
|
|
80
|
+
}
|
|
81
|
+
@mixin invisible {
|
|
82
|
+
visibility: hidden;
|
|
83
|
+
}
|
|
84
|
+
@mixin collapse {
|
|
85
|
+
visibility: collapse;
|
|
86
|
+
}
|
|
87
|
+
@mixin contents {
|
|
88
|
+
display: contents;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@mixin overflow-hidden {
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
}
|
|
94
|
+
@mixin overflow-visible {
|
|
95
|
+
overflow: visible;
|
|
96
|
+
}
|
|
97
|
+
@mixin overflow-scroll {
|
|
98
|
+
overflow: scroll;
|
|
99
|
+
}
|
|
100
|
+
@mixin overflow-auto {
|
|
101
|
+
overflow: auto;
|
|
102
|
+
}
|
|
103
|
+
@mixin overflow-x-hidden {
|
|
104
|
+
overflow-x: hidden;
|
|
105
|
+
}
|
|
106
|
+
@mixin overflow-y-hidden {
|
|
107
|
+
overflow-y: hidden;
|
|
108
|
+
}
|
|
109
|
+
@mixin overflow-x-scroll {
|
|
110
|
+
overflow-x: scroll;
|
|
111
|
+
}
|
|
112
|
+
@mixin overflow-y-scroll {
|
|
113
|
+
overflow-y: scroll;
|
|
114
|
+
}
|
|
115
|
+
@mixin overflow-x-auto {
|
|
116
|
+
overflow-x: auto;
|
|
117
|
+
}
|
|
118
|
+
@mixin overflow-y-auto {
|
|
119
|
+
overflow-y: auto;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@if VAR.$generate-utility-classes {
|
|
123
|
+
// Base Classes
|
|
124
|
+
#{VAR.$parent-selector} .hide {
|
|
125
|
+
@include hide;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#{VAR.$parent-selector} .show {
|
|
129
|
+
@include show;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#{VAR.$parent-selector} .block {
|
|
133
|
+
@include block;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#{VAR.$parent-selector} .inline {
|
|
137
|
+
@include inline;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
#{VAR.$parent-selector} .inline-block {
|
|
141
|
+
@include inline-block;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
#{VAR.$parent-selector} .visible {
|
|
145
|
+
@include visible;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#{VAR.$parent-selector} .invisible {
|
|
149
|
+
@include invisible;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
#{VAR.$parent-selector} .collapse {
|
|
153
|
+
@include collapse;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
#{VAR.$parent-selector} .contents {
|
|
157
|
+
@include contents;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
#{VAR.$parent-selector} .overflow-hidden {
|
|
161
|
+
@include overflow-hidden;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
#{VAR.$parent-selector} .overflow-visible {
|
|
165
|
+
@include overflow-visible;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
#{VAR.$parent-selector} .overflow-scroll {
|
|
169
|
+
@include overflow-scroll;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
#{VAR.$parent-selector} .overflow-auto {
|
|
173
|
+
@include overflow-auto;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
#{VAR.$parent-selector} .overflow-x-hidden {
|
|
177
|
+
@include overflow-x-hidden;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
#{VAR.$parent-selector} .overflow-y-hidden {
|
|
181
|
+
@include overflow-y-hidden;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
#{VAR.$parent-selector} .overflow-x-scroll {
|
|
185
|
+
@include overflow-x-scroll;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
#{VAR.$parent-selector} .overflow-y-scroll {
|
|
189
|
+
@include overflow-y-scroll;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
#{VAR.$parent-selector} .overflow-x-auto {
|
|
193
|
+
@include overflow-x-auto;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
#{VAR.$parent-selector} .overflow-y-auto {
|
|
197
|
+
@include overflow-y-auto;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
#{VAR.$parent-selector} .d {
|
|
201
|
+
&-tbl {
|
|
202
|
+
@include d-tbl;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&-tbl-row {
|
|
206
|
+
@include d-tbl-row;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&-tbl-cell {
|
|
210
|
+
@include d-tbl-cell;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
109
214
|
// Responsive Variants
|
|
110
|
-
@each $breakpoint, $width in
|
|
215
|
+
@each $breakpoint, $width in VAR.$breakpoints {
|
|
111
216
|
@media (min-width: #{$width}) {
|
|
112
|
-
.hide\@#{$breakpoint} {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
217
|
+
#{VAR.$parent-selector} .hide\@#{$breakpoint} {
|
|
218
|
+
@include hide;
|
|
219
|
+
}
|
|
220
|
+
#{VAR.$parent-selector} .show\@#{$breakpoint} {
|
|
221
|
+
@include show;
|
|
222
|
+
}
|
|
223
|
+
#{VAR.$parent-selector} .block\@#{$breakpoint} {
|
|
224
|
+
@include block;
|
|
225
|
+
}
|
|
226
|
+
#{VAR.$parent-selector} .inline\@#{$breakpoint} {
|
|
227
|
+
@include inline;
|
|
228
|
+
}
|
|
229
|
+
#{VAR.$parent-selector} .inline-block\@#{$breakpoint} {
|
|
230
|
+
@include inline-block;
|
|
231
|
+
}
|
|
232
|
+
#{VAR.$parent-selector} .visible\@#{$breakpoint} {
|
|
233
|
+
@include visible;
|
|
234
|
+
}
|
|
235
|
+
#{VAR.$parent-selector} .invisible\@#{$breakpoint} {
|
|
236
|
+
@include invisible;
|
|
237
|
+
}
|
|
238
|
+
#{VAR.$parent-selector} .collapse\@#{$breakpoint} {
|
|
239
|
+
@include collapse;
|
|
240
|
+
}
|
|
241
|
+
#{VAR.$parent-selector} .contents\@#{$breakpoint} {
|
|
242
|
+
@include contents;
|
|
243
|
+
}
|
|
244
|
+
#{VAR.$parent-selector} .overflow-hidden\@#{$breakpoint} {
|
|
245
|
+
@include overflow-hidden;
|
|
246
|
+
}
|
|
247
|
+
#{VAR.$parent-selector} .overflow-visible\@#{$breakpoint} {
|
|
248
|
+
@include overflow-visible;
|
|
249
|
+
}
|
|
250
|
+
#{VAR.$parent-selector} .overflow-scroll\@#{$breakpoint} {
|
|
251
|
+
@include overflow-scroll;
|
|
252
|
+
}
|
|
253
|
+
#{VAR.$parent-selector} .overflow-auto\@#{$breakpoint} {
|
|
254
|
+
@include overflow-auto;
|
|
255
|
+
}
|
|
256
|
+
#{VAR.$parent-selector} .overflow-x-hidden\@#{$breakpoint} {
|
|
257
|
+
@include overflow-x-hidden;
|
|
258
|
+
}
|
|
259
|
+
#{VAR.$parent-selector} .overflow-y-hidden\@#{$breakpoint} {
|
|
260
|
+
@include overflow-y-hidden;
|
|
261
|
+
}
|
|
262
|
+
#{VAR.$parent-selector} .overflow-x-scroll\@#{$breakpoint} {
|
|
263
|
+
@include overflow-x-scroll;
|
|
264
|
+
}
|
|
265
|
+
#{VAR.$parent-selector} .overflow-y-scroll\@#{$breakpoint} {
|
|
266
|
+
@include overflow-y-scroll;
|
|
267
|
+
}
|
|
268
|
+
#{VAR.$parent-selector} .overflow-x-auto\@#{$breakpoint} {
|
|
269
|
+
@include overflow-x-auto;
|
|
270
|
+
}
|
|
271
|
+
#{VAR.$parent-selector} .overflow-y-auto\@#{$breakpoint} {
|
|
272
|
+
@include overflow-y-auto;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
#{VAR.$parent-selector} .d {
|
|
276
|
+
&-tbl\@#{$breakpoint} {
|
|
277
|
+
@include d-tbl;
|
|
278
|
+
}
|
|
279
|
+
&-tbl-row\@#{$breakpoint} {
|
|
280
|
+
@include d-tbl-row;
|
|
281
|
+
}
|
|
282
|
+
&-tbl-cell\@#{$breakpoint} {
|
|
283
|
+
@include d-tbl-cell;
|
|
284
|
+
}
|
|
136
285
|
}
|
|
137
286
|
}
|
|
138
287
|
}
|
|
139
|
-
}
|
|
288
|
+
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
@use "sass:list";
|
|
5
5
|
@use "sass:meta";
|
|
6
6
|
|
|
7
|
-
@use "../abstracts/config" as
|
|
7
|
+
@use "../abstracts/config" as VAR;
|
|
8
8
|
|
|
9
|
-
@if
|
|
9
|
+
@if VAR.$enable-debugger {
|
|
10
10
|
.NuvoUI-Debugger-Wrapper {
|
|
11
11
|
color: #fff;
|
|
12
12
|
font-family: Arial, sans-serif;
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.NuvoUI-Debugger-Main {
|
|
49
|
-
$breakpoint-keys: map.keys(
|
|
49
|
+
$breakpoint-keys: map.keys(VAR.$breakpoints);
|
|
50
50
|
$total: list.length($breakpoint-keys);
|
|
51
51
|
|
|
52
52
|
&::before,
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
@for $i from 1 through $total {
|
|
64
64
|
$current: list.nth($breakpoint-keys, $i);
|
|
65
|
-
$current-width: map.get(
|
|
65
|
+
$current-width: map.get(VAR.$breakpoints, $current);
|
|
66
66
|
|
|
67
67
|
@if $i == 1 {
|
|
68
68
|
@media (max-width: #{$current-width}) {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
} @else {
|
|
74
74
|
$prev: list.nth($breakpoint-keys, $i - 1);
|
|
75
|
-
$prev-width: map.get(
|
|
75
|
+
$prev-width: map.get(VAR.$breakpoints, $prev);
|
|
76
76
|
|
|
77
77
|
@media (min-width: #{$prev-width}) and (max-width: (#{$current-width} - 1)) {
|
|
78
78
|
&::before {
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
// Module: Media Queries
|
|
3
3
|
|
|
4
4
|
@use "sass:map";
|
|
5
|
+
@use "sass:string";
|
|
5
6
|
@use "sass:math";
|
|
6
7
|
@use "sass:meta";
|
|
7
|
-
@use "../abstracts" as
|
|
8
|
+
@use "../abstracts/config" as VAR;
|
|
8
9
|
@use "../abstracts/functions" as FN;
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -12,25 +13,16 @@
|
|
|
12
13
|
* @param {string|number} $breakpoint - The breakpoint value.
|
|
13
14
|
* @param {string} $type - The media query type (e.g. 'lg', 'md').
|
|
14
15
|
*/
|
|
15
|
-
@mixin media-up($breakpoint) {
|
|
16
|
-
$blueprint-value: FN.get-breakpoint-value($breakpoint);
|
|
17
|
-
$
|
|
18
|
-
@
|
|
19
|
-
$blueprint-value: $blueprint-value * 1px;
|
|
20
|
-
$unit: 'px';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@media screen and (min-width: FN.get-breakpoint-value($blueprint-value)) {
|
|
16
|
+
@mixin media-up($breakpoint, $debug: null) {
|
|
17
|
+
$blueprint-value: FN.fix-units(FN.get-breakpoint-value($breakpoint, $debug));
|
|
18
|
+
$val: $blueprint-value - 0.01;
|
|
19
|
+
@media screen and (min-width: #{$val}) {
|
|
24
20
|
@content;
|
|
25
21
|
}
|
|
26
22
|
}
|
|
27
23
|
|
|
28
24
|
@mixin media-down($breakpoint) {
|
|
29
|
-
$blueprint-value: FN.get-breakpoint-value($breakpoint);
|
|
30
|
-
$unit: math.unit($blueprint-value);
|
|
31
|
-
@if $unit == '' {
|
|
32
|
-
$blueprint-value: $blueprint-value * 1px;
|
|
33
|
-
}
|
|
25
|
+
$blueprint-value: FN.fix-units(FN.get-breakpoint-value($breakpoint));
|
|
34
26
|
$val: $blueprint-value - 0.01;
|
|
35
27
|
@media screen and (max-width: #{$val}) {
|
|
36
28
|
@content;
|
|
@@ -38,14 +30,9 @@
|
|
|
38
30
|
}
|
|
39
31
|
|
|
40
32
|
@mixin media-between($lower, $upper) {
|
|
41
|
-
$lower-val: FN.get-breakpoint-value($lower);
|
|
42
|
-
$upper-val: FN.get-breakpoint-value($upper);
|
|
43
|
-
$
|
|
44
|
-
@if $unit == '' {
|
|
45
|
-
$upper-val: $upper-val * 1px;
|
|
46
|
-
}
|
|
47
|
-
$upper-val: $blueprint-value - 0.01;
|
|
48
|
-
|
|
33
|
+
$lower-val: FN.fix-units(FN.get-breakpoint-value($lower));
|
|
34
|
+
$upper-val: FN.fix-units(FN.get-breakpoint-value($upper));
|
|
35
|
+
$upper-val: $upper-val - 0.01;
|
|
49
36
|
@media screen and (min-width: #{$lower-val}) and (max-width: #{$upper-val}) {
|
|
50
37
|
@content;
|
|
51
38
|
}
|
|
@@ -53,10 +40,19 @@
|
|
|
53
40
|
|
|
54
41
|
// Only at specific breakpoint
|
|
55
42
|
@mixin media-only($breakpoint) {
|
|
56
|
-
|
|
43
|
+
@if meta.type-of($breakpoint) == number and math.is-unitless($breakpoint) {
|
|
44
|
+
@error "media-only() needs a breakpoint value";
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@if map.has-key(VAR.$breakpoints, $breakpoint) {
|
|
48
|
+
$min: FN.get-breakpoint-value($breakpoint);
|
|
49
|
+
} @else {
|
|
50
|
+
@error "media-only() needs a valid breakpoint value #{$breakpoint} is not in your $breakpoints map";
|
|
51
|
+
}
|
|
52
|
+
|
|
57
53
|
$next-breakpoint: null;
|
|
58
54
|
|
|
59
|
-
@each $name, $width in
|
|
55
|
+
@each $name, $width in VAR.$breakpoints {
|
|
60
56
|
@if $width > $min and (meta.type-of($next-breakpoint) == "null" or $width < $next-breakpoint) {
|
|
61
57
|
$next-breakpoint: $width;
|
|
62
58
|
}
|
|
@@ -108,12 +104,13 @@
|
|
|
108
104
|
// todo: doc
|
|
109
105
|
// User preference takes precedence
|
|
110
106
|
@mixin dark-mode {
|
|
111
|
-
@if
|
|
107
|
+
@if VAR.$enable-dark-mode {
|
|
108
|
+
// todo: documentation as this will fully remove the dark mode by force
|
|
112
109
|
// Apply when user explicitly chooses dark
|
|
113
110
|
[data-theme="dark"] & {
|
|
114
111
|
@content;
|
|
115
112
|
}
|
|
116
|
-
|
|
113
|
+
|
|
117
114
|
// Apply when system is dark AND user hasn't made a choice
|
|
118
115
|
@media (prefers-color-scheme: dark) {
|
|
119
116
|
[data-theme="system"] & {
|