@nuvoui/core 1.1.5 → 1.1.7
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.min.css +1 -1
- package/package.json +2 -1
- package/src/styles/base/_base.scss +8 -6
- package/src/styles/index.scss +8 -5
- package/src/styles/layouts/_flex.scss +206 -8
- package/src/styles/layouts/_grid.scss +51 -11
- package/src/styles/mixins-map.scss +100 -58
- package/src/styles/themes/_theme.scss +29 -2
- package/src/styles/utilities/_borders.scss +2 -5
- package/src/styles/utilities/_container-queries.scss +58 -0
- package/src/styles/utilities/_display.scss +59 -16
- package/src/styles/utilities/_functions.scss +23 -123
- package/src/styles/utilities/_helpers.scss +128 -0
- package/src/styles/utilities/_media-queries.scss +33 -65
- package/src/styles/utilities/_opacity.scss +1 -1
- package/src/styles/utilities/_position.scss +2 -2
- package/src/styles/utilities/_sizing.scss +20 -8
- package/src/styles/utilities/_spacing.scss +1 -1
- package/src/styles/utilities/_typography.scss +65 -17
- package/src/styles/utilities/_variables.scss +4 -13
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
@use 'utilities/animations' as *;
|
|
9
9
|
@use 'utilities/borders' as *;
|
|
10
10
|
@use 'utilities/colors' as *;
|
|
11
|
+
@use 'utilities/container-queries' as *;
|
|
11
12
|
@use 'utilities/display' as *;
|
|
12
13
|
@use 'utilities/functions' as *;
|
|
14
|
+
@use 'utilities/helpers' as *;
|
|
13
15
|
@use 'utilities/media-queries' as *;
|
|
14
16
|
@use 'utilities/opacity' as *;
|
|
15
17
|
@use 'utilities/position' as *;
|
|
@@ -112,6 +114,8 @@
|
|
|
112
114
|
@include self-center;
|
|
113
115
|
} @else if $mixin-str == 'self-stretch' {
|
|
114
116
|
@include self-stretch;
|
|
117
|
+
} @else if $mixin-str == 'self-baseline' {
|
|
118
|
+
@include self-baseline;
|
|
115
119
|
} @else if $mixin-str == 'shrink' {
|
|
116
120
|
@include shrink;
|
|
117
121
|
} @else if $mixin-str == 'shrink-0' {
|
|
@@ -136,20 +140,24 @@
|
|
|
136
140
|
@include flow-in-col;
|
|
137
141
|
} @else if $mixin-str == 'flow-dense-items' {
|
|
138
142
|
@include flow-dense-items;
|
|
139
|
-
} @else if $mixin-str == '
|
|
140
|
-
@include
|
|
141
|
-
} @else if $mixin-str == '
|
|
142
|
-
@include
|
|
143
|
-
} @else if $mixin-str == '
|
|
144
|
-
@include
|
|
145
|
-
} @else if $mixin-str == '
|
|
146
|
-
@include
|
|
143
|
+
} @else if $mixin-str == 'hide' {
|
|
144
|
+
@include hide;
|
|
145
|
+
} @else if $mixin-str == 'block' {
|
|
146
|
+
@include block;
|
|
147
|
+
} @else if $mixin-str == 'inline' {
|
|
148
|
+
@include inline;
|
|
149
|
+
} @else if $mixin-str == 'inline-block' {
|
|
150
|
+
@include inline-block;
|
|
151
|
+
} @else if $mixin-str == 'show' {
|
|
152
|
+
@include show;
|
|
147
153
|
} @else if $mixin-str == 'd-tbl' {
|
|
148
154
|
@include d-tbl;
|
|
149
155
|
} @else if $mixin-str == 'd-tbl-row' {
|
|
150
156
|
@include d-tbl-row;
|
|
151
157
|
} @else if $mixin-str == 'd-tbl-cell' {
|
|
152
158
|
@include d-tbl-cell;
|
|
159
|
+
} @else if $mixin-str == 'overflow-hidden' {
|
|
160
|
+
@include overflow-hidden;
|
|
153
161
|
} @else if $mixin-str == 'touch' {
|
|
154
162
|
@include touch;
|
|
155
163
|
} @else if $mixin-str == 'print' {
|
|
@@ -198,22 +206,6 @@
|
|
|
198
206
|
@include mr-auto;
|
|
199
207
|
} @else if $mixin-str == 'mx-auto' {
|
|
200
208
|
@include mx-auto;
|
|
201
|
-
} @else if $mixin-str == 'text-xs' {
|
|
202
|
-
@include text-xs;
|
|
203
|
-
} @else if $mixin-str == 'text-sm' {
|
|
204
|
-
@include text-sm;
|
|
205
|
-
} @else if $mixin-str == 'text-md' {
|
|
206
|
-
@include text-md;
|
|
207
|
-
} @else if $mixin-str == 'text-lg' {
|
|
208
|
-
@include text-lg;
|
|
209
|
-
} @else if $mixin-str == 'text-xl' {
|
|
210
|
-
@include text-xl;
|
|
211
|
-
} @else if $mixin-str == 'text-2xl' {
|
|
212
|
-
@include text-2xl;
|
|
213
|
-
} @else if $mixin-str == 'text-3xl' {
|
|
214
|
-
@include text-3xl;
|
|
215
|
-
} @else if $mixin-str == 'text-4xl' {
|
|
216
|
-
@include text-4xl;
|
|
217
209
|
} @else if $mixin-str == 'font-thin' {
|
|
218
210
|
@include font-thin;
|
|
219
211
|
} @else if $mixin-str == 'font-extralight' {
|
|
@@ -292,6 +284,11 @@
|
|
|
292
284
|
$end: str.length($mixin-str) - 1;
|
|
293
285
|
$value: str.slice($mixin-str, $start, $end);
|
|
294
286
|
@include rows(str.unquote($value));
|
|
287
|
+
} @else if str.index($mixin-str, 'cols-custom(') == 1 {
|
|
288
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
289
|
+
$end: str.length($mixin-str) - 1;
|
|
290
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
291
|
+
@include cols-custom(str.unquote($value));
|
|
295
292
|
} @else if str.index($mixin-str, 'auto-fit(') == 1 {
|
|
296
293
|
$start: str.index($mixin-str, '(') + 1;
|
|
297
294
|
$end: str.length($mixin-str) - 1;
|
|
@@ -397,6 +394,31 @@
|
|
|
397
394
|
$end: str.length($mixin-str) - 1;
|
|
398
395
|
$value: str.slice($mixin-str, $start, $end);
|
|
399
396
|
@include filter(str.unquote($value));
|
|
397
|
+
} @else if str.index($mixin-str, 'container-up(') == 1 {
|
|
398
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
399
|
+
$end: str.length($mixin-str) - 1;
|
|
400
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
401
|
+
@include container-up(str.unquote($value));
|
|
402
|
+
} @else if str.index($mixin-str, 'container-down(') == 1 {
|
|
403
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
404
|
+
$end: str.length($mixin-str) - 1;
|
|
405
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
406
|
+
@include container-down(str.unquote($value));
|
|
407
|
+
} @else if str.index($mixin-str, 'container-between(') == 1 {
|
|
408
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
409
|
+
$end: str.length($mixin-str) - 1;
|
|
410
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
411
|
+
@include container-between(str.unquote($value));
|
|
412
|
+
} @else if str.index($mixin-str, 'container-only(') == 1 {
|
|
413
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
414
|
+
$end: str.length($mixin-str) - 1;
|
|
415
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
416
|
+
@include container-only(str.unquote($value));
|
|
417
|
+
} @else if str.index($mixin-str, 'container-query(') == 1 {
|
|
418
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
419
|
+
$end: str.length($mixin-str) - 1;
|
|
420
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
421
|
+
@include container-query(str.unquote($value));
|
|
400
422
|
} @else if str.index($mixin-str, 'media-up(') == 1 {
|
|
401
423
|
$start: str.index($mixin-str, '(') + 1;
|
|
402
424
|
$end: str.length($mixin-str) - 1;
|
|
@@ -417,11 +439,6 @@
|
|
|
417
439
|
$end: str.length($mixin-str) - 1;
|
|
418
440
|
$value: str.slice($mixin-str, $start, $end);
|
|
419
441
|
@include media-only(str.unquote($value));
|
|
420
|
-
} @else if str.index($mixin-str, 'container-query(') == 1 {
|
|
421
|
-
$start: str.index($mixin-str, '(') + 1;
|
|
422
|
-
$end: str.length($mixin-str) - 1;
|
|
423
|
-
$value: str.slice($mixin-str, $start, $end);
|
|
424
|
-
@include container-query(str.unquote($value));
|
|
425
442
|
} @else if str.index($mixin-str, 'supports(') == 1 {
|
|
426
443
|
$start: str.index($mixin-str, '(') + 1;
|
|
427
444
|
$end: str.length($mixin-str) - 1;
|
|
@@ -627,6 +644,11 @@
|
|
|
627
644
|
$end: str.length($mixin-str) - 1;
|
|
628
645
|
$value: str.slice($mixin-str, $start, $end);
|
|
629
646
|
@include gap-y(str.unquote($value));
|
|
647
|
+
} @else if str.index($mixin-str, 'text-size(') == 1 {
|
|
648
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
649
|
+
$end: str.length($mixin-str) - 1;
|
|
650
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
651
|
+
@include text-size(str.unquote($value));
|
|
630
652
|
}
|
|
631
653
|
}
|
|
632
654
|
} @else {
|
|
@@ -696,6 +718,8 @@
|
|
|
696
718
|
@include self-center;
|
|
697
719
|
} @else if $mixin-str == 'self-stretch' {
|
|
698
720
|
@include self-stretch;
|
|
721
|
+
} @else if $mixin-str == 'self-baseline' {
|
|
722
|
+
@include self-baseline;
|
|
699
723
|
} @else if $mixin-str == 'shrink' {
|
|
700
724
|
@include shrink;
|
|
701
725
|
} @else if $mixin-str == 'shrink-0' {
|
|
@@ -720,20 +744,24 @@
|
|
|
720
744
|
@include flow-in-col;
|
|
721
745
|
} @else if $mixin-str == 'flow-dense-items' {
|
|
722
746
|
@include flow-dense-items;
|
|
723
|
-
} @else if $mixin-str == '
|
|
724
|
-
@include
|
|
725
|
-
} @else if $mixin-str == '
|
|
726
|
-
@include
|
|
727
|
-
} @else if $mixin-str == '
|
|
728
|
-
@include
|
|
729
|
-
} @else if $mixin-str == '
|
|
730
|
-
@include
|
|
747
|
+
} @else if $mixin-str == 'hide' {
|
|
748
|
+
@include hide;
|
|
749
|
+
} @else if $mixin-str == 'block' {
|
|
750
|
+
@include block;
|
|
751
|
+
} @else if $mixin-str == 'inline' {
|
|
752
|
+
@include inline;
|
|
753
|
+
} @else if $mixin-str == 'inline-block' {
|
|
754
|
+
@include inline-block;
|
|
755
|
+
} @else if $mixin-str == 'show' {
|
|
756
|
+
@include show;
|
|
731
757
|
} @else if $mixin-str == 'd-tbl' {
|
|
732
758
|
@include d-tbl;
|
|
733
759
|
} @else if $mixin-str == 'd-tbl-row' {
|
|
734
760
|
@include d-tbl-row;
|
|
735
761
|
} @else if $mixin-str == 'd-tbl-cell' {
|
|
736
762
|
@include d-tbl-cell;
|
|
763
|
+
} @else if $mixin-str == 'overflow-hidden' {
|
|
764
|
+
@include overflow-hidden;
|
|
737
765
|
} @else if $mixin-str == 'touch' {
|
|
738
766
|
@include touch;
|
|
739
767
|
} @else if $mixin-str == 'print' {
|
|
@@ -782,22 +810,6 @@
|
|
|
782
810
|
@include mr-auto;
|
|
783
811
|
} @else if $mixin-str == 'mx-auto' {
|
|
784
812
|
@include mx-auto;
|
|
785
|
-
} @else if $mixin-str == 'text-xs' {
|
|
786
|
-
@include text-xs;
|
|
787
|
-
} @else if $mixin-str == 'text-sm' {
|
|
788
|
-
@include text-sm;
|
|
789
|
-
} @else if $mixin-str == 'text-md' {
|
|
790
|
-
@include text-md;
|
|
791
|
-
} @else if $mixin-str == 'text-lg' {
|
|
792
|
-
@include text-lg;
|
|
793
|
-
} @else if $mixin-str == 'text-xl' {
|
|
794
|
-
@include text-xl;
|
|
795
|
-
} @else if $mixin-str == 'text-2xl' {
|
|
796
|
-
@include text-2xl;
|
|
797
|
-
} @else if $mixin-str == 'text-3xl' {
|
|
798
|
-
@include text-3xl;
|
|
799
|
-
} @else if $mixin-str == 'text-4xl' {
|
|
800
|
-
@include text-4xl;
|
|
801
813
|
} @else if $mixin-str == 'font-thin' {
|
|
802
814
|
@include font-thin;
|
|
803
815
|
} @else if $mixin-str == 'font-extralight' {
|
|
@@ -876,6 +888,11 @@
|
|
|
876
888
|
$end: str.length($mixin-str) - 1;
|
|
877
889
|
$value: str.slice($mixin-str, $start, $end);
|
|
878
890
|
@include rows(str.unquote($value));
|
|
891
|
+
} @else if str.index($mixin-str, 'cols-custom(') == 1 {
|
|
892
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
893
|
+
$end: str.length($mixin-str) - 1;
|
|
894
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
895
|
+
@include cols-custom(str.unquote($value));
|
|
879
896
|
} @else if str.index($mixin-str, 'auto-fit(') == 1 {
|
|
880
897
|
$start: str.index($mixin-str, '(') + 1;
|
|
881
898
|
$end: str.length($mixin-str) - 1;
|
|
@@ -981,6 +998,31 @@
|
|
|
981
998
|
$end: str.length($mixin-str) - 1;
|
|
982
999
|
$value: str.slice($mixin-str, $start, $end);
|
|
983
1000
|
@include filter(str.unquote($value));
|
|
1001
|
+
} @else if str.index($mixin-str, 'container-up(') == 1 {
|
|
1002
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
1003
|
+
$end: str.length($mixin-str) - 1;
|
|
1004
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
1005
|
+
@include container-up(str.unquote($value));
|
|
1006
|
+
} @else if str.index($mixin-str, 'container-down(') == 1 {
|
|
1007
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
1008
|
+
$end: str.length($mixin-str) - 1;
|
|
1009
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
1010
|
+
@include container-down(str.unquote($value));
|
|
1011
|
+
} @else if str.index($mixin-str, 'container-between(') == 1 {
|
|
1012
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
1013
|
+
$end: str.length($mixin-str) - 1;
|
|
1014
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
1015
|
+
@include container-between(str.unquote($value));
|
|
1016
|
+
} @else if str.index($mixin-str, 'container-only(') == 1 {
|
|
1017
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
1018
|
+
$end: str.length($mixin-str) - 1;
|
|
1019
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
1020
|
+
@include container-only(str.unquote($value));
|
|
1021
|
+
} @else if str.index($mixin-str, 'container-query(') == 1 {
|
|
1022
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
1023
|
+
$end: str.length($mixin-str) - 1;
|
|
1024
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
1025
|
+
@include container-query(str.unquote($value));
|
|
984
1026
|
} @else if str.index($mixin-str, 'media-up(') == 1 {
|
|
985
1027
|
$start: str.index($mixin-str, '(') + 1;
|
|
986
1028
|
$end: str.length($mixin-str) - 1;
|
|
@@ -1001,11 +1043,6 @@
|
|
|
1001
1043
|
$end: str.length($mixin-str) - 1;
|
|
1002
1044
|
$value: str.slice($mixin-str, $start, $end);
|
|
1003
1045
|
@include media-only(str.unquote($value));
|
|
1004
|
-
} @else if str.index($mixin-str, 'container-query(') == 1 {
|
|
1005
|
-
$start: str.index($mixin-str, '(') + 1;
|
|
1006
|
-
$end: str.length($mixin-str) - 1;
|
|
1007
|
-
$value: str.slice($mixin-str, $start, $end);
|
|
1008
|
-
@include container-query(str.unquote($value));
|
|
1009
1046
|
} @else if str.index($mixin-str, 'supports(') == 1 {
|
|
1010
1047
|
$start: str.index($mixin-str, '(') + 1;
|
|
1011
1048
|
$end: str.length($mixin-str) - 1;
|
|
@@ -1211,6 +1248,11 @@
|
|
|
1211
1248
|
$end: str.length($mixin-str) - 1;
|
|
1212
1249
|
$value: str.slice($mixin-str, $start, $end);
|
|
1213
1250
|
@include gap-y(str.unquote($value));
|
|
1251
|
+
} @else if str.index($mixin-str, 'text-size(') == 1 {
|
|
1252
|
+
$start: str.index($mixin-str, '(') + 1;
|
|
1253
|
+
$end: str.length($mixin-str) - 1;
|
|
1254
|
+
$value: str.slice($mixin-str, $start, $end);
|
|
1255
|
+
@include text-size(str.unquote($value));
|
|
1214
1256
|
} @else {
|
|
1215
1257
|
@warn "Mixin '#{$mixin}' is not defined.";
|
|
1216
1258
|
}
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
@use '../utilities/variables' as *;
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
8
|
// Generate scales for primitives
|
|
11
9
|
$colors-primitives: ();
|
|
12
10
|
|
|
@@ -40,6 +38,24 @@ $colors-primitives: ();
|
|
|
40
38
|
--button-text-color: var(--gray-100);
|
|
41
39
|
--link-color: var(--primary);
|
|
42
40
|
--link-hover-color: var(--primary-600);
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&::-webkit-scrollbar {
|
|
44
|
+
width: 12px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&::-webkit-scrollbar-track {
|
|
48
|
+
background: var(--background); // Light background
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&::-webkit-scrollbar-thumb {
|
|
52
|
+
background-color: #888; // Dark gray thumb
|
|
53
|
+
border-radius: 6px;
|
|
54
|
+
border: 3px solid var(--background); // Light background
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
scrollbar-width: thin;
|
|
58
|
+
scrollbar-color: #888 var(--background); // Dark gray thumb, light background
|
|
43
59
|
}
|
|
44
60
|
|
|
45
61
|
[data-theme="dark"] {
|
|
@@ -54,6 +70,17 @@ $colors-primitives: ();
|
|
|
54
70
|
--button-text-color: var(--gray-200);
|
|
55
71
|
--link-color: var(--primary);
|
|
56
72
|
--link-hover-color: var(--primary-400);
|
|
73
|
+
|
|
74
|
+
&::-webkit-scrollbar-track {
|
|
75
|
+
background: var(--background);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&::-webkit-scrollbar-thumb {
|
|
79
|
+
background-color: #555;
|
|
80
|
+
border: 3px solid var(--background);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
scrollbar-color: #555 var(--background);
|
|
57
84
|
}
|
|
58
85
|
|
|
59
86
|
// --font-family-heading: var(--font-family-base);
|
|
@@ -20,13 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
// Responsive Position Classes
|
|
22
22
|
@each $breakpoint, $width in $breakpoints {
|
|
23
|
-
@media (min-width: $width) {
|
|
24
|
-
|
|
25
|
-
@each $i in 0 1 2 4 8 {
|
|
26
|
-
.border-#{$i}\@#{$breakpoint} { @include border($i); }
|
|
27
|
-
}
|
|
23
|
+
@media (min-width: #{$width}) {
|
|
28
24
|
@each $i in 0 2 3 4 5 10 15 20 25 {
|
|
29
25
|
.rounded-#{$i}\@#{$breakpoint} { @include border($i); }
|
|
30
26
|
}
|
|
27
|
+
.rounded\@#{$breakpoint} { @include border(0.25rem); }
|
|
31
28
|
}
|
|
32
29
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
3
|
+
@use './variables' as *;
|
|
4
|
+
@use './functions' as FN;
|
|
5
|
+
|
|
6
|
+
/// Container Query: Up
|
|
7
|
+
@mixin container-up($breakpoint, $containerName: null) {
|
|
8
|
+
$bp-val: FN.get-breakpoint-value($breakpoint);
|
|
9
|
+
@container #{$containerName} (min-width: #{$bp-val}) {
|
|
10
|
+
@content;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/// Container Query: Down
|
|
15
|
+
@mixin container-down($breakpoint, $containerName: null) {
|
|
16
|
+
$bp-val: FN.get-breakpoint-value($breakpoint);
|
|
17
|
+
@container #{$containerName} (max-width: (#{ $bp-val } - 0.02px)) {
|
|
18
|
+
@content;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// Container Query: Between
|
|
23
|
+
@mixin container-between($lower, $upper, $containerName: null) {
|
|
24
|
+
$min: FN.get-breakpoint-value($lower);
|
|
25
|
+
$max: FN.get-breakpoint-value($upper);
|
|
26
|
+
@container #{$containerName} (min-width: #{$min}) and (max-width: (#{ $max } - 0.02px)) {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// Container Query: Only
|
|
32
|
+
@mixin container-only($breakpoint, $containerName: null) {
|
|
33
|
+
$min: FN.get-breakpoint-value($breakpoint);
|
|
34
|
+
$next-breakpoint: null;
|
|
35
|
+
|
|
36
|
+
@each $name, $width in $breakpoints {
|
|
37
|
+
@if $width > $min and (not $next-breakpoint or $width < $next-breakpoint) {
|
|
38
|
+
$next-breakpoint: $width;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@if $next-breakpoint {
|
|
43
|
+
@container #{$containerName} (min-width: #{$min}) and (max-width: (#{ $next-breakpoint } - 0.02px)) {
|
|
44
|
+
@content;
|
|
45
|
+
}
|
|
46
|
+
} @else {
|
|
47
|
+
@container #{$containerName} (min-width: #{$min}) {
|
|
48
|
+
@content;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// Container Query: Query by Size
|
|
54
|
+
@mixin container-query($size, $containerName: null) {
|
|
55
|
+
@container #{$containerName} (min-width: $size) {
|
|
56
|
+
@content;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1,36 +1,79 @@
|
|
|
1
|
+
// Section: Utilities
|
|
2
|
+
// Module: Display
|
|
1
3
|
|
|
2
4
|
@use './variables' as *;
|
|
3
|
-
@use './functions' as
|
|
5
|
+
@use './functions' as FN;
|
|
4
6
|
|
|
5
7
|
// Display Mixins
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @description Set display to none.
|
|
11
|
+
*/
|
|
12
|
+
@mixin hide { display: none; }
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @description Set display to block.
|
|
16
|
+
*/
|
|
17
|
+
@mixin block { display: block; }
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Set display to inline.
|
|
21
|
+
*/
|
|
22
|
+
@mixin inline { display: inline; }
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @description Set display to inline-block.
|
|
26
|
+
*/
|
|
27
|
+
@mixin inline-block { display: inline-block; }
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @description Set display to initial original state.
|
|
31
|
+
*/
|
|
32
|
+
@mixin show { display: revert; }
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description Set display to table.
|
|
36
|
+
*/
|
|
10
37
|
@mixin d-tbl { display: table; }
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @description Set display to table-row.
|
|
41
|
+
*/
|
|
11
42
|
@mixin d-tbl-row { display: table-row; }
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @description Set display to table-cell.
|
|
46
|
+
*/
|
|
12
47
|
@mixin d-tbl-cell { display: table-cell; }
|
|
13
48
|
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@mixin overflow-hidden { overflow: hidden; }
|
|
52
|
+
|
|
14
53
|
// Base Classes
|
|
15
|
-
.hide { @include
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.inline
|
|
54
|
+
.hide { @include hide; }
|
|
55
|
+
.show { @include show; }
|
|
56
|
+
.block { @include block; }
|
|
57
|
+
.inline { @include inline; }
|
|
58
|
+
.inline-block { @include inline-block; }
|
|
59
|
+
.overflow-hidden { @include overflow-hidden; }
|
|
19
60
|
|
|
20
61
|
.d {
|
|
21
62
|
&-tbl { @include d-tbl; }
|
|
22
63
|
&-tbl-row { @include d-tbl-row; }
|
|
23
64
|
&-tbl-cell { @include d-tbl-cell; }
|
|
24
65
|
}
|
|
25
|
-
|
|
66
|
+
|
|
26
67
|
// Responsive Variants
|
|
27
68
|
@each $breakpoint, $width in $breakpoints {
|
|
28
|
-
@media (min-width: $width) {
|
|
29
|
-
.hide\@#{$breakpoint} { @include
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
.inline
|
|
33
|
-
|
|
69
|
+
@media (min-width: #{$width}) {
|
|
70
|
+
.hide\@#{$breakpoint} { @include hide; }
|
|
71
|
+
.show\@#{$breakpoint} { @include show; }
|
|
72
|
+
.block\@#{$breakpoint} { @include block; }
|
|
73
|
+
.inline\@#{$breakpoint} { @include inline; }
|
|
74
|
+
.inline-block\@#{$breakpoint} { @include inline-block; }
|
|
75
|
+
.overflow-hidden\@#{$breakpoint} { @include overflow-hidden; }
|
|
76
|
+
|
|
34
77
|
.d {
|
|
35
78
|
&-tbl\@#{$breakpoint} { @include d-tbl; }
|
|
36
79
|
&-tbl-row\@#{$breakpoint} { @include d-tbl-row; }
|
|
@@ -2,8 +2,30 @@
|
|
|
2
2
|
@use 'sass:math';
|
|
3
3
|
@use 'sass:map';
|
|
4
4
|
@use 'sass:list';
|
|
5
|
+
@use 'sass:meta';
|
|
5
6
|
@use 'variables' as *;
|
|
6
7
|
|
|
8
|
+
@function str-replace($string, $search, $replace: " ") {
|
|
9
|
+
$index: string.index($string, $search);
|
|
10
|
+
@if $index {
|
|
11
|
+
@return string.slice($string, 1, $index - 1)
|
|
12
|
+
+ $replace
|
|
13
|
+
+ str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
|
|
14
|
+
}
|
|
15
|
+
@return $string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@function get-breakpoint-value($bp) {
|
|
19
|
+
@if map.has-key($breakpoints, $bp) {
|
|
20
|
+
@return map.get($breakpoints, $bp);
|
|
21
|
+
} @else if meta.type-of($bp) == number {
|
|
22
|
+
@return $bp;
|
|
23
|
+
} @else {
|
|
24
|
+
@warn 'Invalid breakpoint: #{$bp}';
|
|
25
|
+
@return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
7
29
|
@function strip-unit($value) {
|
|
8
30
|
@return math.div($value, ($value * 0 + 1));
|
|
9
31
|
}
|
|
@@ -54,131 +76,9 @@
|
|
|
54
76
|
} @else if string.index($value-str, 'pt') {
|
|
55
77
|
@return 'pt';
|
|
56
78
|
} @else if string.index($value-str, 'pc') {
|
|
57
|
-
|
|
79
|
+
@return 'pc';
|
|
58
80
|
}
|
|
59
81
|
|
|
60
82
|
// Return empty string if no unit found
|
|
61
83
|
@return '';
|
|
62
84
|
}
|
|
63
|
-
|
|
64
|
-
@if $enable-debuger {
|
|
65
|
-
.NuvoUI-Debugger-Wrapper {
|
|
66
|
-
color: #fff;
|
|
67
|
-
font-family: Arial, sans-serif;
|
|
68
|
-
position: fixed;
|
|
69
|
-
z-index: 999999;
|
|
70
|
-
inset: 10px auto auto 10px;
|
|
71
|
-
pointer-events: none;
|
|
72
|
-
|
|
73
|
-
&.top-left {
|
|
74
|
-
inset: 10px auto auto 10px;
|
|
75
|
-
text-align: left;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.top-right {
|
|
79
|
-
inset: 10px 10px auto auto;
|
|
80
|
-
text-align: right;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&.bottom-left {
|
|
84
|
-
inset: auto auto 10px 10px;
|
|
85
|
-
text-align: left;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&.bottom-right {
|
|
89
|
-
inset: auto 10px 10px auto;
|
|
90
|
-
text-align: right;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.NuvoUI-Debugger-Main, .NuvoUI-Debugger{
|
|
94
|
-
padding: 10px;
|
|
95
|
-
background-color: rgb(0 0 0 / 80%);
|
|
96
|
-
border-radius: 5px;
|
|
97
|
-
border: 1px solid green;
|
|
98
|
-
box-shadow: 0 0 2px 0 #fff;
|
|
99
|
-
pointer-events: none;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.NuvoUI-Debugger-Main {
|
|
103
|
-
$breakpoint-keys: map.keys($breakpoints);
|
|
104
|
-
$total: list.length($breakpoint-keys);
|
|
105
|
-
|
|
106
|
-
&::before,
|
|
107
|
-
&::after {
|
|
108
|
-
font-family: 'Courier New', Courier, monospace;
|
|
109
|
-
font-size: 0.8em;
|
|
110
|
-
display: block;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&::before {
|
|
114
|
-
font-weight: bold;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@for $i from 1 through $total {
|
|
118
|
-
$current: list.nth($breakpoint-keys, $i);
|
|
119
|
-
$current-width: map.get($breakpoints, $current);
|
|
120
|
-
|
|
121
|
-
@if $i == 1 {
|
|
122
|
-
@media (max-width: $current-width) {
|
|
123
|
-
&::before {
|
|
124
|
-
content: "Screen: #{$current}";
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
} @else {
|
|
128
|
-
$prev: list.nth($breakpoint-keys, $i - 1);
|
|
129
|
-
$prev-width: map.get($breakpoints, $prev);
|
|
130
|
-
|
|
131
|
-
@media (min-width: $prev-width) and (max-width: ($current-width - 1)) {
|
|
132
|
-
&::before {
|
|
133
|
-
content: "Screen: #{$current}";
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
&::after {
|
|
140
|
-
content: attr(data-size);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.NuvoUI-Debugger {
|
|
145
|
-
margin-top: 10px;
|
|
146
|
-
|
|
147
|
-
&::before,
|
|
148
|
-
&::after {
|
|
149
|
-
font-family: 'Courier New', Courier, monospace;
|
|
150
|
-
font-size: 0.8em;
|
|
151
|
-
display: block;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&::before {
|
|
155
|
-
font-weight: bold;
|
|
156
|
-
content: attr(data-element);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&::after {
|
|
160
|
-
content: attr(data-size);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.NuvoUI-Debugger-Close {
|
|
165
|
-
color: #fff;
|
|
166
|
-
cursor: pointer;
|
|
167
|
-
font-size: 14px;
|
|
168
|
-
pointer-events: auto;
|
|
169
|
-
position: absolute;
|
|
170
|
-
right: 0;
|
|
171
|
-
top: 0;
|
|
172
|
-
background: #00800199;
|
|
173
|
-
border-radius: 20px;
|
|
174
|
-
height: 14px;
|
|
175
|
-
width: 14px;
|
|
176
|
-
line-height: 14px;
|
|
177
|
-
text-align: center;
|
|
178
|
-
|
|
179
|
-
&:hover {
|
|
180
|
-
background: #008001;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|