@volverjs/style 0.1.12-beta.18 → 0.1.12-beta.19
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/base.css +1 -1
- package/dist/props/spacing.css +1 -1
- package/dist/props/typography.css +1 -1
- package/dist/props.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +8 -8
- package/src/export.scss +8 -8
- package/src/props/breakpoints.scss +5 -4
- package/src/props/spacing.scss +2 -2
- package/src/props/typography.scss +3 -2
- package/src/settings/components/_vv-accordion.scss +1 -0
- package/src/tools/_breakpoints.scss +13 -4
- package/src/tools/_mixins.scss +27 -21
- package/src/utilities/flexbox.scss +6 -1
- package/src/utilities/layout.scss +3 -2
- package/src/utilities/spacing.scss +10 -1
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"bugs": {
|
|
25
25
|
"url": "https://github.com/volverjs/style/issues"
|
|
26
26
|
},
|
|
27
|
-
"version": "0.1.12-beta.
|
|
27
|
+
"version": "0.1.12-beta.19",
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">= 12.x"
|
|
30
30
|
},
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@vueuse/core": "^10.11.0",
|
|
42
42
|
"@vueuse/head": "^2.0.0",
|
|
43
43
|
"eslint-config-prettier": "^9.1.0",
|
|
44
|
-
"eslint-plugin-vue": "^9.
|
|
45
|
-
"glob": "^
|
|
44
|
+
"eslint-plugin-vue": "^9.27.0",
|
|
45
|
+
"glob": "^11.0.0",
|
|
46
46
|
"icss-utils": "^5.1.0",
|
|
47
47
|
"markdown-it-anchor": "^9.0.1",
|
|
48
48
|
"markdown-it-prism": "^2.3.0",
|
|
49
49
|
"postcss": "^8.4.39",
|
|
50
50
|
"postcss-html": "^1.7.0",
|
|
51
|
-
"postcss-preset-env": "^9.
|
|
51
|
+
"postcss-preset-env": "^9.6.0",
|
|
52
52
|
"prettier": "^3.3.2",
|
|
53
53
|
"prism-themes": "^1.9.0",
|
|
54
54
|
"prismjs": "^1.29.0",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"remark-frontmatter": "^5.0.0",
|
|
58
58
|
"remark-gfm": "^4.0.0",
|
|
59
59
|
"remark-lint": "^10.0.0",
|
|
60
|
-
"sass": "^1.77.
|
|
60
|
+
"sass": "^1.77.7",
|
|
61
61
|
"stylelint": "^16.6.1",
|
|
62
|
-
"stylelint-config-recommended-scss": "^14.
|
|
62
|
+
"stylelint-config-recommended-scss": "^14.1.0",
|
|
63
63
|
"stylelint-config-recommended-vue": "^1.5.0",
|
|
64
64
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
65
65
|
"unplugin-auto-import": "^0.17.6",
|
|
66
66
|
"unplugin-vue-components": "^0.27.2",
|
|
67
|
-
"vite": "^5.3.
|
|
67
|
+
"vite": "^5.3.3",
|
|
68
68
|
"vite-plugin-css-export": "^3.0.0",
|
|
69
69
|
"vite-plugin-eslint": "^1.8.1",
|
|
70
70
|
"vite-plugin-handlebars": "^2.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"vite-plugin-pages": "^0.32.3",
|
|
73
73
|
"vite-plugin-stylelint": "^5.3.1",
|
|
74
74
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
75
|
-
"vite-ssg": "^0.23.
|
|
75
|
+
"vite-ssg": "^0.23.8",
|
|
76
76
|
"vite-ssg-sitemap": "^0.7.1",
|
|
77
77
|
"vue": "^3.4.31",
|
|
78
78
|
"vue-live": "^2.5.4",
|
package/src/export.scss
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
// #region CUSTOMIZATION
|
|
12
12
|
// colors
|
|
13
13
|
@each $key, $value in $colors {
|
|
14
|
-
@if type-of($value) == 'map' {
|
|
14
|
+
@if meta.type-of($value) == 'map' {
|
|
15
15
|
@each $subKey, $subValue in $value {
|
|
16
|
-
@if type-of($value) not 'map' {
|
|
16
|
+
@if meta.type-of($value) not 'map' {
|
|
17
17
|
@if not
|
|
18
18
|
str-index($subKey, 'hue') and not
|
|
19
19
|
str-index($subKey, 'saturation') and not
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
@each $key, $value in $dark-colors {
|
|
38
|
-
@if type-of($value) == 'map' {
|
|
38
|
+
@if meta.type-of($value) == 'map' {
|
|
39
39
|
@each $subKey, $subValue in $value {
|
|
40
|
-
@if type-of($value) not 'map' {
|
|
40
|
+
@if meta.type-of($value) not 'map' {
|
|
41
41
|
@if not
|
|
42
42
|
str-index($subKey, 'hue') and not
|
|
43
43
|
str-index($subKey, 'saturation') and not
|
|
@@ -235,9 +235,9 @@
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
@each $size, $value in $spacing-dynamic {
|
|
238
|
-
@if type-of($value) == 'map' {
|
|
238
|
+
@if meta.type-of($value) == 'map' {
|
|
239
239
|
@each $subKey, $subValue in $value {
|
|
240
|
-
@if type-of($value) not 'map' {
|
|
240
|
+
@if meta.type-of($value) not 'map' {
|
|
241
241
|
spacing-dynamic__#{$size}__#{$subKey}: $subValue;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
@@ -250,9 +250,9 @@
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
@each $size, $value in $font-size-dynamic {
|
|
253
|
-
@if type-of($value) == 'map' {
|
|
253
|
+
@if meta.type-of($value) == 'map' {
|
|
254
254
|
@each $subKey, $subValue in $value {
|
|
255
|
-
@if type-of($value) not 'map' {
|
|
255
|
+
@if meta.type-of($value) not 'map' {
|
|
256
256
|
font-size-dynamic__#{$size}__#{$subKey}: $subValue;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
@use '../context' as *;
|
|
3
3
|
|
|
4
4
|
:where(:host, :root, .theme) {
|
|
5
|
+
@include spread-map-into-props(
|
|
6
|
+
$map: map.remove($breakpoints, 'xxs'),
|
|
7
|
+
$prefix: breakpoint
|
|
8
|
+
);
|
|
9
|
+
|
|
5
10
|
@each $breakpoint, $breakpoint-value in $breakpoints {
|
|
6
11
|
@media screen and (min-width: $breakpoint-value) {
|
|
7
12
|
--breakpoint-key: #{$breakpoint};
|
|
8
13
|
--breakpoint-value: #{$breakpoint-value};
|
|
9
14
|
}
|
|
10
15
|
}
|
|
11
|
-
@include spread-map-into-props(
|
|
12
|
-
$map: map.remove($breakpoints, 'xxs'),
|
|
13
|
-
$prefix: breakpoint
|
|
14
|
-
);
|
|
15
16
|
}
|
package/src/props/spacing.scss
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
// dynamic
|
|
11
11
|
@each $name, $sizes in $spacing-dynamic {
|
|
12
12
|
@each $breakpoint, $size in $sizes {
|
|
13
|
-
@if map
|
|
13
|
+
@if map.has-key($breakpoints, $breakpoint) {
|
|
14
14
|
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
|
15
15
|
$var: $size;
|
|
16
16
|
|
|
17
17
|
// if is a static spacing
|
|
18
|
-
@if map
|
|
18
|
+
@if map.has-key($spacing, $size) {
|
|
19
19
|
$var: var(--spacing-#{$size});
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../context' as *;
|
|
2
3
|
|
|
3
4
|
:where(:host, :root, .theme) {
|
|
@@ -21,12 +22,12 @@
|
|
|
21
22
|
// font-size dynamic
|
|
22
23
|
@each $name, $sizes in $font-size-dynamic {
|
|
23
24
|
@each $breakpoint, $size in $sizes {
|
|
24
|
-
@if map
|
|
25
|
+
@if map.has-key($breakpoints, $breakpoint) {
|
|
25
26
|
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
|
26
27
|
$var: $size;
|
|
27
28
|
|
|
28
29
|
// if is a static font-size
|
|
29
|
-
@if map
|
|
30
|
+
@if map.has-key($font-size, $size) {
|
|
30
31
|
$var: var(--text-#{$size});
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
$bps-names: map.keys($bps)
|
|
20
20
|
) {
|
|
21
21
|
$n: list.index($bps-names, $name);
|
|
22
|
+
|
|
22
23
|
@return if(
|
|
23
|
-
$n != null and $n < length($bps-names),
|
|
24
|
-
nth($bps-names, $n + 1),
|
|
24
|
+
$n != null and $n < list.length($bps-names),
|
|
25
|
+
list.nth($bps-names, $n + 1),
|
|
25
26
|
null
|
|
26
27
|
);
|
|
27
28
|
}
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
// 576px
|
|
32
33
|
@function breakpoint-min($name, $bps) {
|
|
33
34
|
$min: map.get($bps, $name);
|
|
35
|
+
|
|
34
36
|
@return if($min != 0, $min, null);
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
// 767.98px
|
|
45
47
|
@function breakpoint-max($name, $bps) {
|
|
46
48
|
$next: breakpoint-next($name, $bps);
|
|
49
|
+
|
|
47
50
|
@return if($next, breakpoint-min($next, $bps) - 0.02, null);
|
|
48
51
|
}
|
|
49
52
|
|
|
@@ -61,12 +64,17 @@
|
|
|
61
64
|
// Makes the @content apply to the given breakpoint and wider.
|
|
62
65
|
@mixin media-breakpoint-up($name, $bps) {
|
|
63
66
|
$min: breakpoint-min($name, $bps);
|
|
67
|
+
|
|
64
68
|
@if $min {
|
|
65
69
|
@media (min-width: $min) {
|
|
66
|
-
|
|
70
|
+
& {
|
|
71
|
+
@content;
|
|
72
|
+
}
|
|
67
73
|
}
|
|
68
74
|
} @else {
|
|
69
|
-
|
|
75
|
+
& {
|
|
76
|
+
@content;
|
|
77
|
+
}
|
|
70
78
|
}
|
|
71
79
|
}
|
|
72
80
|
|
|
@@ -74,6 +82,7 @@
|
|
|
74
82
|
// Makes the @content apply to the given breakpoint and narrower.
|
|
75
83
|
@mixin media-breakpoint-down($name, $bps) {
|
|
76
84
|
$max: breakpoint-max($name, $bps);
|
|
85
|
+
|
|
77
86
|
@if $max {
|
|
78
87
|
@media (max-width: $max) {
|
|
79
88
|
@content;
|
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
|
|
|
@@ -13,9 +14,9 @@
|
|
|
13
14
|
$prev-num: null;
|
|
14
15
|
|
|
15
16
|
@each $key, $num in $map {
|
|
16
|
-
@if not $prev-num or unit($num) == '%' {
|
|
17
|
+
@if not $prev-num or math.unit($num) == '%' {
|
|
17
18
|
// Do nothing
|
|
18
|
-
} @else if not
|
|
19
|
+
} @else if not compatible($prev-num, $num) {
|
|
19
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}' !";
|
|
20
21
|
} @else if $prev-num >= $num {
|
|
21
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}' !";
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
string.slice(meta.inspect($key), 1, 1) !=
|
|
60
61
|
'['
|
|
61
62
|
{
|
|
62
|
-
@if type-of($value) == 'map' {
|
|
63
|
+
@if meta.type-of($value) == 'map' {
|
|
63
64
|
@if $deep {
|
|
64
65
|
@include spread-map-into-props($value, $name, $key);
|
|
65
66
|
}
|
|
@@ -84,7 +85,9 @@
|
|
|
84
85
|
$prefix: '',
|
|
85
86
|
$zero-specificity: false
|
|
86
87
|
) {
|
|
87
|
-
@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
|
+
''
|
|
88
91
|
{
|
|
89
92
|
@each $breakpoint, $breakpoint-value in $bps {
|
|
90
93
|
@if $breakpoint-value > 0 {
|
|
@@ -96,7 +99,7 @@
|
|
|
96
99
|
$key: #{$name}-#{meta.inspect($key)};
|
|
97
100
|
}
|
|
98
101
|
|
|
99
|
-
@if type-of($value) == 'map' and $deep {
|
|
102
|
+
@if meta.type-of($value) == 'map' and $deep {
|
|
100
103
|
@include spread-map-into-utilities(
|
|
101
104
|
$map: $value,
|
|
102
105
|
$class: $class,
|
|
@@ -130,25 +133,25 @@
|
|
|
130
133
|
$var: str-replace($var, '\\/', '-');
|
|
131
134
|
|
|
132
135
|
// check if value is not a map (spacing-dynamic)
|
|
133
|
-
@if type-of($value) != 'map' {
|
|
136
|
+
@if meta.type-of($value) != 'map' {
|
|
134
137
|
$default: $value;
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
// check if map is a list
|
|
138
|
-
@if type-of($map) ==
|
|
141
|
+
@if meta.type-of($map) ==
|
|
139
142
|
'list' and
|
|
140
143
|
(not $default or $default == '')
|
|
141
144
|
{
|
|
142
145
|
$default: $key;
|
|
143
146
|
}
|
|
144
147
|
|
|
145
|
-
@if type-of($default) == 'string' {
|
|
148
|
+
@if meta.type-of($default) == 'string' {
|
|
146
149
|
$default: string.unquote($default);
|
|
147
150
|
}
|
|
148
151
|
|
|
149
152
|
%#{$prefix}#{$class-name} {
|
|
150
153
|
@include media-breakpoint-up($breakpoint, $bps) {
|
|
151
|
-
@if type-of($attribute) != 'list' {
|
|
154
|
+
@if meta.type-of($attribute) != 'list' {
|
|
152
155
|
$attribute: ($attribute);
|
|
153
156
|
}
|
|
154
157
|
|
|
@@ -200,7 +203,7 @@
|
|
|
200
203
|
$block: &;
|
|
201
204
|
}
|
|
202
205
|
|
|
203
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
206
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
204
207
|
@each $item, $value in map.get($map, $key) {
|
|
205
208
|
$selector: $block + '--' + $item;
|
|
206
209
|
|
|
@@ -309,7 +312,7 @@
|
|
|
309
312
|
$block: &;
|
|
310
313
|
}
|
|
311
314
|
|
|
312
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
315
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
313
316
|
@each $element, $value in map.get($map, $key) {
|
|
314
317
|
$selector: $block + '__' + $element;
|
|
315
318
|
|
|
@@ -436,7 +439,7 @@
|
|
|
436
439
|
$blocks: &;
|
|
437
440
|
}
|
|
438
441
|
|
|
439
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
442
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
440
443
|
@each $state, $value in map.get($map, $key) {
|
|
441
444
|
@if list.index(
|
|
442
445
|
(
|
|
@@ -712,7 +715,7 @@
|
|
|
712
715
|
$block: &;
|
|
713
716
|
}
|
|
714
717
|
|
|
715
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
718
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
716
719
|
@each $breakpoint, $value in map.get($map, $key) {
|
|
717
720
|
@if string.index($breakpoint, '-') {
|
|
718
721
|
$operator: list.nth(string.split($breakpoint, '-'), 1);
|
|
@@ -844,10 +847,13 @@
|
|
|
844
847
|
xxs: 0,
|
|
845
848
|
)
|
|
846
849
|
) {
|
|
847
|
-
@if type-of($map) == 'map' and $prefix != '' {
|
|
850
|
+
@if meta.type-of($map) == 'map' and $prefix != '' {
|
|
848
851
|
@each $key, $value in $map {
|
|
849
852
|
@if not list.index($ignore, $key) {
|
|
850
|
-
@if type-of($value) ==
|
|
853
|
+
@if meta.type-of($value) ==
|
|
854
|
+
'map' and
|
|
855
|
+
($deep or $key == 'pseudo')
|
|
856
|
+
{
|
|
851
857
|
$original: map.get($original, $key);
|
|
852
858
|
|
|
853
859
|
@if not $original {
|
|
@@ -860,7 +866,7 @@
|
|
|
860
866
|
|
|
861
867
|
@if $key == 'pseudo' {
|
|
862
868
|
@each $pseudo-element, $pseudo-map in $value {
|
|
863
|
-
@if type-of($pseudo-map) == 'map' {
|
|
869
|
+
@if meta.type-of($pseudo-map) == 'map' {
|
|
864
870
|
@if list.index(
|
|
865
871
|
(
|
|
866
872
|
before,
|
|
@@ -943,7 +949,7 @@
|
|
|
943
949
|
);
|
|
944
950
|
}
|
|
945
951
|
} @else if
|
|
946
|
-
type-of($value) !=
|
|
952
|
+
meta.type-of($value) !=
|
|
947
953
|
'map' and
|
|
948
954
|
(string.slice(meta.inspect($key), 1, 1) != '_')
|
|
949
955
|
{
|
|
@@ -995,7 +1001,7 @@
|
|
|
995
1001
|
|
|
996
1002
|
// Wrap selector with :where()
|
|
997
1003
|
@mixin wrap-with-where($selector, $enabled: true) {
|
|
998
|
-
@if type-of($selector) == 'map' or type-of($selector) == 'list' {
|
|
1004
|
+
@if meta.type-of($selector) == 'map' or meta.type-of($selector) == 'list' {
|
|
999
1005
|
$selector: #{$selector};
|
|
1000
1006
|
}
|
|
1001
1007
|
|
|
@@ -1028,7 +1034,7 @@
|
|
|
1028
1034
|
$custom-transitions: false,
|
|
1029
1035
|
$bps: (xxs: 0)
|
|
1030
1036
|
) {
|
|
1031
|
-
@if type-of($map) == 'map' and $block != '' {
|
|
1037
|
+
@if meta.type-of($map) == 'map' and $block != '' {
|
|
1032
1038
|
$selector: '.' + $block;
|
|
1033
1039
|
|
|
1034
1040
|
// custom props
|
|
@@ -1161,12 +1167,12 @@
|
|
|
1161
1167
|
$block: &;
|
|
1162
1168
|
}
|
|
1163
1169
|
|
|
1164
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
1170
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
1165
1171
|
@each $transition, $states in map.get($map, $key) {
|
|
1166
1172
|
@each $state, $value in $states {
|
|
1167
1173
|
@if $state in [ 'enter-from', 'enter-active', 'enter-to',
|
|
1168
1174
|
'leave-from', 'leave-active', 'leave-to', 'active',
|
|
1169
|
-
'inert'] and type-of($value) == 'map'
|
|
1175
|
+
'inert'] and meta.type-of($value) == 'map'
|
|
1170
1176
|
{
|
|
1171
1177
|
$selector: '.#{$transition}';
|
|
1172
1178
|
|
|
@@ -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,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use '../context' as *;
|
|
3
4
|
|
|
4
5
|
// aspect
|
|
@@ -135,11 +136,11 @@
|
|
|
135
136
|
{
|
|
136
137
|
$var: $value;
|
|
137
138
|
|
|
138
|
-
@if not map
|
|
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
|
|
|
142
|
-
@if type-of($value) != 'map' {
|
|
143
|
+
@if meta.type-of($value) != 'map' {
|
|
143
144
|
$var: var(--spacing-#{$size}, #{$value});
|
|
144
145
|
}
|
|
145
146
|
}
|
|
@@ -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
|