@volverjs/style 0.1.12-beta.9 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/base.css +1 -1
- package/dist/components/vv-accordion-group.css +1 -1
- package/dist/components/vv-accordion.css +1 -1
- package/dist/components/vv-alert-group.css +1 -1
- package/dist/components/vv-alert.css +1 -1
- package/dist/components/vv-avatar-group.css +1 -1
- package/dist/components/vv-avatar.css +1 -1
- package/dist/components/vv-badge.css +1 -1
- package/dist/components/vv-breadcrumb.css +1 -1
- package/dist/components/vv-button-group.css +1 -1
- package/dist/components/vv-button.css +1 -1
- package/dist/components/vv-card.css +1 -1
- package/dist/components/vv-checkbox-group.css +1 -1
- package/dist/components/vv-checkbox.css +1 -1
- package/dist/components/vv-dialog.css +1 -1
- package/dist/components/vv-dropdown-action.css +1 -1
- package/dist/components/vv-dropdown-optgroup.css +1 -1
- package/dist/components/vv-dropdown-option.css +1 -1
- package/dist/components/vv-dropdown.css +1 -1
- package/dist/components/vv-input-file.css +1 -1
- package/dist/components/vv-input-text.css +1 -1
- package/dist/components/vv-nav.css +1 -1
- package/dist/components/vv-progress.css +1 -1
- package/dist/components/vv-radio-group.css +1 -1
- package/dist/components/vv-radio.css +1 -1
- package/dist/components/vv-select.css +1 -1
- package/dist/components/vv-skeleton.css +1 -1
- package/dist/components/vv-tab.css +1 -1
- package/dist/components/vv-table.css +1 -1
- package/dist/components/vv-text.css +1 -1
- package/dist/components/vv-textarea.css +1 -1
- package/dist/components/vv-tooltip.css +1 -1
- package/dist/components.css +1 -1
- package/dist/export.css +1 -1
- package/dist/props/background.css +1 -1
- package/dist/props/spacing.css +1 -1
- package/dist/props/transitions.css +1 -1
- package/dist/props/typography.css +1 -1
- package/dist/props.css +1 -1
- package/dist/themes/dark/props.css +1 -1
- package/dist/themes/dark/volver.css +1 -1
- package/dist/utilities/backgrounds.css +1 -1
- package/dist/utilities/effects.css +1 -1
- package/dist/utilities/interactivity.css +1 -1
- package/dist/utilities/sizing.css +1 -1
- package/dist/utilities/transforms.css +1 -1
- package/dist/utilities/typography.css +1 -1
- package/dist/utilities.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +34 -33
- package/src/_preflight.scss +21 -2
- package/src/components/vv-button-group.scss +6 -6
- package/src/components/vv-tooltip.scss +1 -1
- package/src/export.scss +16 -14
- package/src/props/breakpoints.scss +5 -4
- package/src/props/spacing.scss +2 -2
- package/src/props/typography.scss +3 -2
- package/src/settings/_colors.scss +11 -11
- package/src/settings/_effects.scss +3 -3
- package/src/settings/_interactivity.scss +14 -0
- package/src/settings/_typography.scss +9 -1
- package/src/settings/components/_vv-accordion-group.scss +2 -2
- package/src/settings/components/_vv-accordion.scss +2 -0
- package/src/settings/components/_vv-alert-group.scss +5 -2
- package/src/settings/components/_vv-alert.scss +1 -1
- package/src/settings/components/_vv-avatar-group.scss +1 -0
- package/src/settings/components/_vv-avatar.scss +12 -8
- package/src/settings/components/_vv-badge.scss +2 -0
- package/src/settings/components/_vv-breadcrumb.scss +1 -0
- package/src/settings/components/_vv-button.scss +1 -0
- package/src/settings/components/_vv-card.scss +2 -0
- package/src/settings/components/_vv-checkbox-group.scss +2 -0
- package/src/settings/components/_vv-checkbox.scss +6 -0
- package/src/settings/components/_vv-dialog.scss +1 -0
- package/src/settings/components/_vv-input-file.scss +32 -3
- package/src/settings/components/_vv-input-text.scss +4 -1
- package/src/settings/components/_vv-radio.scss +1 -0
- package/src/settings/components/_vv-select.scss +4 -1
- package/src/settings/components/_vv-textarea.scss +5 -1
- package/src/themes/dark/settings/_colors.scss +8 -8
- package/src/tools/_breakpoints.scss +13 -4
- package/src/tools/_functions.scss +100 -26
- package/src/tools/_mixins.scss +68 -24
- package/src/utilities/flexbox.scss +6 -1
- package/src/utilities/interactivity.scss +17 -1
- package/src/utilities/layout.scss +9 -3
- package/src/utilities/sizing.scss +10 -2
- package/src/utilities/spacing.scss +10 -1
- package/src/utilities/transforms.scss +2 -2
- package/src/utilities/typography.scss +11 -0
package/src/tools/_mixins.scss
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use 'sass:string';
|
|
4
4
|
@use 'sass:meta';
|
|
5
5
|
@use 'sass:selector';
|
|
6
|
+
@use 'sass:math';
|
|
6
7
|
@use 'functions' as *;
|
|
7
8
|
@use 'breakpoints' as *;
|
|
8
9
|
|
|
@@ -11,10 +12,11 @@
|
|
|
11
12
|
@mixin assert-ascending($map, $map-name) {
|
|
12
13
|
$prev-key: null;
|
|
13
14
|
$prev-num: null;
|
|
15
|
+
|
|
14
16
|
@each $key, $num in $map {
|
|
15
|
-
@if not $prev-num or unit($num) == '%' {
|
|
17
|
+
@if not $prev-num or math.unit($num) == '%' {
|
|
16
18
|
// Do nothing
|
|
17
|
-
} @else if not
|
|
19
|
+
} @else if not compatible($prev-num, $num) {
|
|
18
20
|
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
|
19
21
|
} @else if $prev-num >= $num {
|
|
20
22
|
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
@mixin assert-starts-at-zero($map, $map-name: '$grid-breakpoints') {
|
|
31
33
|
$values: map.values($map);
|
|
32
34
|
$first-value: list.nth($values, 1);
|
|
35
|
+
|
|
33
36
|
@if $first-value != 0 {
|
|
34
37
|
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
|
35
38
|
}
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
@mixin spread-map-into-props($map: (), $prefix: '', $old-key: '', $deep: true) {
|
|
40
43
|
@each $key, $value in $map {
|
|
41
44
|
$name: meta.inspect($key);
|
|
45
|
+
|
|
42
46
|
@if $name == meta.inspect($old-key) {
|
|
43
47
|
$name: $prefix;
|
|
44
48
|
} @else if $prefix != '' and meta.inspect($prefix) != meta.inspect($key)
|
|
@@ -56,7 +60,7 @@
|
|
|
56
60
|
string.slice(meta.inspect($key), 1, 1) !=
|
|
57
61
|
'['
|
|
58
62
|
{
|
|
59
|
-
@if type-of($value) == 'map' {
|
|
63
|
+
@if meta.type-of($value) == 'map' {
|
|
60
64
|
@if $deep {
|
|
61
65
|
@include spread-map-into-props($value, $name, $key);
|
|
62
66
|
}
|
|
@@ -81,17 +85,21 @@
|
|
|
81
85
|
$prefix: '',
|
|
82
86
|
$zero-specificity: false
|
|
83
87
|
) {
|
|
84
|
-
@if (type-of($map) == 'map' or type-of($map) == 'list') and
|
|
88
|
+
@if (meta.type-of($map) == 'map' or meta.type-of($map) == 'list') and
|
|
89
|
+
$attribute !=
|
|
90
|
+
''
|
|
85
91
|
{
|
|
86
92
|
@each $breakpoint, $breakpoint-value in $bps {
|
|
87
93
|
@if $breakpoint-value > 0 {
|
|
88
94
|
$prefix: $breakpoint + '\\:';
|
|
89
95
|
}
|
|
96
|
+
|
|
90
97
|
@each $key, $value in $map {
|
|
91
98
|
@if $name != '' and meta.inspect($key) != meta.inspect($name) {
|
|
92
99
|
$key: #{$name}-#{meta.inspect($key)};
|
|
93
100
|
}
|
|
94
|
-
|
|
101
|
+
|
|
102
|
+
@if meta.type-of($value) == 'map' and $deep {
|
|
95
103
|
@include spread-map-into-utilities(
|
|
96
104
|
$map: $value,
|
|
97
105
|
$class: $class,
|
|
@@ -125,27 +133,28 @@
|
|
|
125
133
|
$var: str-replace($var, '\\/', '-');
|
|
126
134
|
|
|
127
135
|
// check if value is not a map (spacing-dynamic)
|
|
128
|
-
@if type-of($value) != 'map' {
|
|
136
|
+
@if meta.type-of($value) != 'map' {
|
|
129
137
|
$default: $value;
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
// check if map is a list
|
|
133
|
-
@if type-of($map) ==
|
|
141
|
+
@if meta.type-of($map) ==
|
|
134
142
|
'list' and
|
|
135
143
|
(not $default or $default == '')
|
|
136
144
|
{
|
|
137
145
|
$default: $key;
|
|
138
146
|
}
|
|
139
147
|
|
|
140
|
-
@if type-of($default) == 'string' {
|
|
148
|
+
@if meta.type-of($default) == 'string' {
|
|
141
149
|
$default: string.unquote($default);
|
|
142
150
|
}
|
|
143
151
|
|
|
144
152
|
%#{$prefix}#{$class-name} {
|
|
145
153
|
@include media-breakpoint-up($breakpoint, $bps) {
|
|
146
|
-
@if type-of($attribute) != 'list' {
|
|
154
|
+
@if meta.type-of($attribute) != 'list' {
|
|
147
155
|
$attribute: ($attribute);
|
|
148
156
|
}
|
|
157
|
+
|
|
149
158
|
@each $attr in $attribute {
|
|
150
159
|
@if $default {
|
|
151
160
|
@if $var != '' {
|
|
@@ -159,6 +168,7 @@
|
|
|
159
168
|
}
|
|
160
169
|
}
|
|
161
170
|
}
|
|
171
|
+
|
|
162
172
|
@include wrap-with-where(
|
|
163
173
|
$selector: '.' + $prefix + $class-name,
|
|
164
174
|
$enabled: $zero-specificity
|
|
@@ -188,10 +198,12 @@
|
|
|
188
198
|
@if not $original {
|
|
189
199
|
$original: $map;
|
|
190
200
|
}
|
|
201
|
+
|
|
191
202
|
@if not $block {
|
|
192
203
|
$block: &;
|
|
193
204
|
}
|
|
194
|
-
|
|
205
|
+
|
|
206
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
195
207
|
@each $item, $value in map.get($map, $key) {
|
|
196
208
|
$selector: $block + '--' + $item;
|
|
197
209
|
|
|
@@ -300,13 +312,25 @@
|
|
|
300
312
|
$block: &;
|
|
301
313
|
}
|
|
302
314
|
|
|
303
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
315
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
304
316
|
@each $element, $value in map.get($map, $key) {
|
|
305
317
|
$selector: $block + '__' + $element;
|
|
306
318
|
|
|
319
|
+
// combinator
|
|
320
|
+
$combinator: map.get($value, '_combinator');
|
|
321
|
+
|
|
322
|
+
@if not $combinator {
|
|
323
|
+
$combinator: map.get($original, $key, $element, '_combinator');
|
|
324
|
+
}
|
|
325
|
+
|
|
307
326
|
@if $modifier {
|
|
308
327
|
$selectors: ();
|
|
328
|
+
|
|
309
329
|
@each $item in selector.parse($modifier) {
|
|
330
|
+
@if $combinator {
|
|
331
|
+
$item: '#{$item} #{$combinator}';
|
|
332
|
+
}
|
|
333
|
+
|
|
310
334
|
$selectors: list.join(
|
|
311
335
|
$selectors,
|
|
312
336
|
selector.nest($item, $selector)
|
|
@@ -326,6 +350,7 @@
|
|
|
326
350
|
@if $alias {
|
|
327
351
|
@if $modifier {
|
|
328
352
|
$aliases: ();
|
|
353
|
+
|
|
329
354
|
@each $item in selector.parse($modifier) {
|
|
330
355
|
$aliases: list.join(
|
|
331
356
|
$aliases,
|
|
@@ -414,7 +439,7 @@
|
|
|
414
439
|
$blocks: &;
|
|
415
440
|
}
|
|
416
441
|
|
|
417
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
442
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
418
443
|
@each $state, $value in map.get($map, $key) {
|
|
419
444
|
@if list.index(
|
|
420
445
|
(
|
|
@@ -685,10 +710,12 @@
|
|
|
685
710
|
@if not $original {
|
|
686
711
|
$original: $map;
|
|
687
712
|
}
|
|
713
|
+
|
|
688
714
|
@if not $block {
|
|
689
715
|
$block: &;
|
|
690
716
|
}
|
|
691
|
-
|
|
717
|
+
|
|
718
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
692
719
|
@each $breakpoint, $value in map.get($map, $key) {
|
|
693
720
|
@if string.index($breakpoint, '-') {
|
|
694
721
|
$operator: list.nth(string.split($breakpoint, '-'), 1);
|
|
@@ -712,6 +739,7 @@
|
|
|
712
739
|
}
|
|
713
740
|
}
|
|
714
741
|
}
|
|
742
|
+
|
|
715
743
|
@if $operator == 'down' {
|
|
716
744
|
@include wrap-with-where(
|
|
717
745
|
$selector: '#{$modifier}#{$block}',
|
|
@@ -729,6 +757,7 @@
|
|
|
729
757
|
}
|
|
730
758
|
}
|
|
731
759
|
}
|
|
760
|
+
|
|
732
761
|
@if map.has-key($bps, $operator) {
|
|
733
762
|
@include wrap-with-where(
|
|
734
763
|
$selector: '#{$modifier}#{$block}',
|
|
@@ -818,10 +847,13 @@
|
|
|
818
847
|
xxs: 0,
|
|
819
848
|
)
|
|
820
849
|
) {
|
|
821
|
-
@if type-of($map) == 'map' and $prefix != '' {
|
|
850
|
+
@if meta.type-of($map) == 'map' and $prefix != '' {
|
|
822
851
|
@each $key, $value in $map {
|
|
823
852
|
@if not list.index($ignore, $key) {
|
|
824
|
-
@if type-of($value) ==
|
|
853
|
+
@if meta.type-of($value) ==
|
|
854
|
+
'map' and
|
|
855
|
+
($deep or $key == 'pseudo')
|
|
856
|
+
{
|
|
825
857
|
$original: map.get($original, $key);
|
|
826
858
|
|
|
827
859
|
@if not $original {
|
|
@@ -831,9 +863,10 @@
|
|
|
831
863
|
@if $postfix != '' {
|
|
832
864
|
$key: #{$postfix}-#{$key};
|
|
833
865
|
}
|
|
866
|
+
|
|
834
867
|
@if $key == 'pseudo' {
|
|
835
868
|
@each $pseudo-element, $pseudo-map in $value {
|
|
836
|
-
@if type-of($pseudo-map) == 'map' {
|
|
869
|
+
@if meta.type-of($pseudo-map) == 'map' {
|
|
837
870
|
@if list.index(
|
|
838
871
|
(
|
|
839
872
|
before,
|
|
@@ -916,7 +949,7 @@
|
|
|
916
949
|
);
|
|
917
950
|
}
|
|
918
951
|
} @else if
|
|
919
|
-
type-of($value) !=
|
|
952
|
+
meta.type-of($value) !=
|
|
920
953
|
'map' and
|
|
921
954
|
(string.slice(meta.inspect($key), 1, 1) != '_')
|
|
922
955
|
{
|
|
@@ -945,9 +978,15 @@
|
|
|
945
978
|
$prop-to-replace-with: #{$prop-to-replace-with}-#{$key};
|
|
946
979
|
|
|
947
980
|
@if map.get($original, $key) {
|
|
948
|
-
|
|
981
|
+
& {
|
|
982
|
+
#{$prop-to-replace}: var(
|
|
983
|
+
#{$prop-to-replace-with}
|
|
984
|
+
);
|
|
985
|
+
}
|
|
949
986
|
} @else {
|
|
950
|
-
|
|
987
|
+
& {
|
|
988
|
+
#{$key}: var(#{$prop-to-replace-with});
|
|
989
|
+
}
|
|
951
990
|
}
|
|
952
991
|
} @else {
|
|
953
992
|
@if string.slice(meta.inspect($key), 1, 1) == '[' {
|
|
@@ -958,7 +997,9 @@
|
|
|
958
997
|
);
|
|
959
998
|
}
|
|
960
999
|
|
|
961
|
-
|
|
1000
|
+
& {
|
|
1001
|
+
#{$key}: $value;
|
|
1002
|
+
}
|
|
962
1003
|
}
|
|
963
1004
|
}
|
|
964
1005
|
}
|
|
@@ -968,9 +1009,10 @@
|
|
|
968
1009
|
|
|
969
1010
|
// Wrap selector with :where()
|
|
970
1011
|
@mixin wrap-with-where($selector, $enabled: true) {
|
|
971
|
-
@if type-of($selector) == 'map' or type-of($selector) == 'list' {
|
|
1012
|
+
@if meta.type-of($selector) == 'map' or meta.type-of($selector) == 'list' {
|
|
972
1013
|
$selector: #{$selector};
|
|
973
1014
|
}
|
|
1015
|
+
|
|
974
1016
|
@if $enabled {
|
|
975
1017
|
$selector: ':where(#{unquote($selector)})';
|
|
976
1018
|
}
|
|
@@ -1000,7 +1042,7 @@
|
|
|
1000
1042
|
$custom-transitions: false,
|
|
1001
1043
|
$bps: (xxs: 0)
|
|
1002
1044
|
) {
|
|
1003
|
-
@if type-of($map) == 'map' and $block != '' {
|
|
1045
|
+
@if meta.type-of($map) == 'map' and $block != '' {
|
|
1004
1046
|
$selector: '.' + $block;
|
|
1005
1047
|
|
|
1006
1048
|
// custom props
|
|
@@ -1028,6 +1070,7 @@
|
|
|
1028
1070
|
// content
|
|
1029
1071
|
@content;
|
|
1030
1072
|
}
|
|
1073
|
+
|
|
1031
1074
|
@include wrap-with-where(
|
|
1032
1075
|
$selector: $selector,
|
|
1033
1076
|
$enabled: $zero-specificity
|
|
@@ -1131,12 +1174,13 @@
|
|
|
1131
1174
|
@if not $block {
|
|
1132
1175
|
$block: &;
|
|
1133
1176
|
}
|
|
1134
|
-
|
|
1177
|
+
|
|
1178
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
1135
1179
|
@each $transition, $states in map.get($map, $key) {
|
|
1136
1180
|
@each $state, $value in $states {
|
|
1137
1181
|
@if $state in [ 'enter-from', 'enter-active', 'enter-to',
|
|
1138
1182
|
'leave-from', 'leave-active', 'leave-to', 'active',
|
|
1139
|
-
'inert'] and type-of($value) == 'map'
|
|
1183
|
+
'inert'] and meta.type-of($value) == 'map'
|
|
1140
1184
|
{
|
|
1141
1185
|
$selector: '.#{$transition}';
|
|
1142
1186
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use '../context' as *;
|
|
3
4
|
|
|
4
5
|
// flex direction
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
%#{$prefix}#{$postfix} {
|
|
35
36
|
#{$prop}: #{$value};
|
|
36
37
|
}
|
|
38
|
+
|
|
37
39
|
@include wrap-with-where(
|
|
38
40
|
$selector: '.#{$prefix}#{$postfix}',
|
|
39
41
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
$default: null;
|
|
58
60
|
|
|
59
61
|
// check if value is not a map (spacing-dynamic)
|
|
60
|
-
@if type-of($value) != 'map' {
|
|
62
|
+
@if meta.type-of($value) != 'map' {
|
|
61
63
|
$default: $value;
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -67,6 +69,7 @@
|
|
|
67
69
|
%gap-#{$size} {
|
|
68
70
|
gap: #{$var};
|
|
69
71
|
}
|
|
72
|
+
|
|
70
73
|
@include wrap-with-where(
|
|
71
74
|
$selector: '.gap-#{$size}',
|
|
72
75
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -78,6 +81,7 @@
|
|
|
78
81
|
%gap-x-#{$size} {
|
|
79
82
|
column-gap: #{$var};
|
|
80
83
|
}
|
|
84
|
+
|
|
81
85
|
@include wrap-with-where(
|
|
82
86
|
$selector: '.gap-x-#{$size}',
|
|
83
87
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -89,6 +93,7 @@
|
|
|
89
93
|
%gap-y-#{$size} {
|
|
90
94
|
row-gap: #{$var};
|
|
91
95
|
}
|
|
96
|
+
|
|
92
97
|
@include wrap-with-where(
|
|
93
98
|
$selector: '.gap-y-#{$size}',
|
|
94
99
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../context' as *;
|
|
3
3
|
|
|
4
|
-
//
|
|
4
|
+
// cursor
|
|
5
5
|
@include spread-map-into-utilities(
|
|
6
6
|
$map: $cursor,
|
|
7
7
|
$class: cursor,
|
|
8
8
|
$attribute: cursor,
|
|
9
9
|
$zero-specificity: $zero-specificity-for-utilities
|
|
10
10
|
);
|
|
11
|
+
|
|
12
|
+
// pointer events
|
|
13
|
+
@include spread-map-into-utilities(
|
|
14
|
+
$map: $pointer-events,
|
|
15
|
+
$class: pointer-events,
|
|
16
|
+
$attribute: pointer-events,
|
|
17
|
+
$zero-specificity: $zero-specificity-for-utilities
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
// user select
|
|
21
|
+
@include spread-map-into-utilities(
|
|
22
|
+
$map: $user-select,
|
|
23
|
+
$class: user-select,
|
|
24
|
+
$attribute: user-select,
|
|
25
|
+
$zero-specificity: $zero-specificity-for-utilities
|
|
26
|
+
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use '../context' as *;
|
|
3
4
|
|
|
4
5
|
// aspect
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
$attribute: display,
|
|
64
65
|
$zero-specificity: $zero-specificity-for-utilities
|
|
65
66
|
);
|
|
66
|
-
|
|
67
67
|
@include spread-map-into-utilities(
|
|
68
68
|
$map: $display-with-breakpoints,
|
|
69
69
|
$attribute: display,
|
|
@@ -135,10 +135,12 @@
|
|
|
135
135
|
$value in map.merge($placement, map.merge($spacing, $spacing-dynamic))
|
|
136
136
|
{
|
|
137
137
|
$var: $value;
|
|
138
|
-
|
|
138
|
+
|
|
139
|
+
@if not map.has-key($placement, $size) {
|
|
139
140
|
// check if value is not a map (spacing-dynamic)
|
|
140
141
|
$var: var(--spacing-#{$size});
|
|
141
|
-
|
|
142
|
+
|
|
143
|
+
@if meta.type-of($value) != 'map' {
|
|
142
144
|
$var: var(--spacing-#{$size}, #{$value});
|
|
143
145
|
}
|
|
144
146
|
}
|
|
@@ -147,6 +149,7 @@
|
|
|
147
149
|
%inset-#{$size} {
|
|
148
150
|
inset: #{$var};
|
|
149
151
|
}
|
|
152
|
+
|
|
150
153
|
@include wrap-with-where(
|
|
151
154
|
$selector: '.inset-#{$size}',
|
|
152
155
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -158,6 +161,7 @@
|
|
|
158
161
|
%inset-x-#{$size} {
|
|
159
162
|
inset-inline: #{$var};
|
|
160
163
|
}
|
|
164
|
+
|
|
161
165
|
@include wrap-with-where(
|
|
162
166
|
$selector: '.inset-x-#{$size}',
|
|
163
167
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -169,6 +173,7 @@
|
|
|
169
173
|
%inset-y-#{$size} {
|
|
170
174
|
inset-block: #{$var};
|
|
171
175
|
}
|
|
176
|
+
|
|
172
177
|
@include wrap-with-where(
|
|
173
178
|
$selector: '.inset-y-#{$size}',
|
|
174
179
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -181,6 +186,7 @@
|
|
|
181
186
|
%#{$direction}-#{$size} {
|
|
182
187
|
#{$direction}: #{$var};
|
|
183
188
|
}
|
|
189
|
+
|
|
184
190
|
@include wrap-with-where(
|
|
185
191
|
$selector: '.#{$direction}-#{$size}',
|
|
186
192
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../context' as *;
|
|
3
3
|
|
|
4
|
-
// width / height / max-width / max-height
|
|
4
|
+
// width / height / max-width / max-height / min-width / min-height
|
|
5
5
|
@each $class,
|
|
6
|
-
$attribute
|
|
6
|
+
$attribute
|
|
7
|
+
in(
|
|
8
|
+
w: width,
|
|
9
|
+
h: height,
|
|
10
|
+
max-w: max-width,
|
|
11
|
+
max-h: max-height,
|
|
12
|
+
min-w: min-width,
|
|
13
|
+
min-h: min-height
|
|
14
|
+
)
|
|
7
15
|
{
|
|
8
16
|
@include spread-map-into-utilities(
|
|
9
17
|
$map: map.merge($spacing, $spacing-dynamic),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use '../context' as *;
|
|
3
4
|
|
|
4
5
|
@each $prefix, $prop in (m: margin, p: padding, n: margin) {
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
$var: var(--spacing-#{$size});
|
|
7
8
|
|
|
8
9
|
// check if value is not a map (spacing-dynamic)
|
|
9
|
-
@if type-of($value) != 'map' {
|
|
10
|
+
@if meta.type-of($value) != 'map' {
|
|
10
11
|
$var: var(--spacing-#{$size}, #{$value});
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
%#{$prefix}#{$size} {
|
|
20
21
|
#{$prop}: #{$var};
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
@include wrap-with-where(
|
|
23
25
|
$selector: '.#{$prefix}-#{$size}',
|
|
24
26
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
%#{$prefix}x-#{$size} {
|
|
31
33
|
#{$prop}-inline: #{$var};
|
|
32
34
|
}
|
|
35
|
+
|
|
33
36
|
@include wrap-with-where(
|
|
34
37
|
$selector: '.#{$prefix}x-#{$size}',
|
|
35
38
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -41,6 +44,7 @@
|
|
|
41
44
|
%#{$prefix}y-#{$size} {
|
|
42
45
|
#{$prop}-block: #{$var};
|
|
43
46
|
}
|
|
47
|
+
|
|
44
48
|
@include wrap-with-where(
|
|
45
49
|
$selector: '.#{$prefix}y-#{$size}',
|
|
46
50
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -55,6 +59,7 @@
|
|
|
55
59
|
%#{$prefix}#{$direction-prefix}-#{$size} {
|
|
56
60
|
#{$prop}-#{$direction}: #{$var};
|
|
57
61
|
}
|
|
62
|
+
|
|
58
63
|
@include wrap-with-where(
|
|
59
64
|
$selector: '.#{$prefix}#{$direction-prefix}-#{$size}',
|
|
60
65
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -69,6 +74,7 @@
|
|
|
69
74
|
%m-auto {
|
|
70
75
|
margin: auto;
|
|
71
76
|
}
|
|
77
|
+
|
|
72
78
|
@include wrap-with-where(
|
|
73
79
|
$selector: '.m-auto',
|
|
74
80
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -79,6 +85,7 @@
|
|
|
79
85
|
%mx-auto {
|
|
80
86
|
margin-inline: auto;
|
|
81
87
|
}
|
|
88
|
+
|
|
82
89
|
@include wrap-with-where(
|
|
83
90
|
$selector: '.mx-auto',
|
|
84
91
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -89,6 +96,7 @@
|
|
|
89
96
|
%my-auto {
|
|
90
97
|
margin-block: auto;
|
|
91
98
|
}
|
|
99
|
+
|
|
92
100
|
@include wrap-with-where(
|
|
93
101
|
$selector: '.my-auto',
|
|
94
102
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -100,6 +108,7 @@
|
|
|
100
108
|
%m#{$direction-prefix}-auto {
|
|
101
109
|
margin-#{$direction}: auto;
|
|
102
110
|
}
|
|
111
|
+
|
|
103
112
|
@include wrap-with-where(
|
|
104
113
|
$selector: '.m#{$direction-prefix}-auto',
|
|
105
114
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
%translate-x-#{$size} {
|
|
65
|
-
translate: #{$value};
|
|
65
|
+
translate: #{$value} 0;
|
|
66
66
|
}
|
|
67
67
|
@include wrap-with-where(
|
|
68
68
|
$selector: '.translate-x-#{$size}',
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
%-translate-x-#{$size} {
|
|
95
|
-
translate: -#{$value};
|
|
95
|
+
translate: -#{$value} 0;
|
|
96
96
|
}
|
|
97
97
|
@include wrap-with-where(
|
|
98
98
|
$selector: '.-translate-x-#{$size}',
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
%italic {
|
|
35
35
|
font-style: italic;
|
|
36
36
|
}
|
|
37
|
+
|
|
37
38
|
@include wrap-with-where(
|
|
38
39
|
$selector: '.italic',
|
|
39
40
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
%non-italic {
|
|
45
46
|
font-style: normal;
|
|
46
47
|
}
|
|
48
|
+
|
|
47
49
|
@include wrap-with-where(
|
|
48
50
|
$selector: '.non-italic',
|
|
49
51
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
-webkit-font-smoothing: antialiased;
|
|
57
59
|
-moz-osx-font-smoothing: grayscale;
|
|
58
60
|
}
|
|
61
|
+
|
|
59
62
|
@include wrap-with-where(
|
|
60
63
|
$selector: '.antialiased',
|
|
61
64
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -67,6 +70,7 @@
|
|
|
67
70
|
-webkit-font-smoothing: auto;
|
|
68
71
|
-moz-osx-font-smoothing: auto;
|
|
69
72
|
}
|
|
73
|
+
|
|
70
74
|
@include wrap-with-where(
|
|
71
75
|
$selector: '.subpixel-antialiased',
|
|
72
76
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -168,6 +172,7 @@
|
|
|
168
172
|
text-overflow: ellipsis;
|
|
169
173
|
white-space: nowrap;
|
|
170
174
|
}
|
|
175
|
+
|
|
171
176
|
@include wrap-with-where(
|
|
172
177
|
$selector: '.truncate',
|
|
173
178
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -178,6 +183,7 @@
|
|
|
178
183
|
%text-ellipsis {
|
|
179
184
|
text-overflow: ellipsis;
|
|
180
185
|
}
|
|
186
|
+
|
|
181
187
|
@include wrap-with-where(
|
|
182
188
|
$selector: '.text-ellipsis',
|
|
183
189
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -188,6 +194,7 @@
|
|
|
188
194
|
%text-clip {
|
|
189
195
|
text-overflow: clip;
|
|
190
196
|
}
|
|
197
|
+
|
|
191
198
|
@include wrap-with-where(
|
|
192
199
|
$selector: '.text-clip',
|
|
193
200
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -198,6 +205,7 @@
|
|
|
198
205
|
%text-balance {
|
|
199
206
|
text-wrap: balance;
|
|
200
207
|
}
|
|
208
|
+
|
|
201
209
|
@include wrap-with-where(
|
|
202
210
|
$selector: '.text-balance',
|
|
203
211
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -210,6 +218,7 @@
|
|
|
210
218
|
overflow-wrap: normal;
|
|
211
219
|
word-break: normal;
|
|
212
220
|
}
|
|
221
|
+
|
|
213
222
|
@include wrap-with-where(
|
|
214
223
|
$selector: '.break-normal',
|
|
215
224
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -220,6 +229,7 @@
|
|
|
220
229
|
%break-words {
|
|
221
230
|
overflow-wrap: break-word;
|
|
222
231
|
}
|
|
232
|
+
|
|
223
233
|
@include wrap-with-where(
|
|
224
234
|
$selector: '.break-words',
|
|
225
235
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -230,6 +240,7 @@
|
|
|
230
240
|
%break-all {
|
|
231
241
|
word-break: break-all;
|
|
232
242
|
}
|
|
243
|
+
|
|
233
244
|
@include wrap-with-where(
|
|
234
245
|
$selector: '.break-all',
|
|
235
246
|
$enabled: $zero-specificity-for-utilities
|