@unocss/preset-wind 0.20.2 → 0.20.4
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/index.cjs +47 -67
- package/dist/index.mjs +48 -68
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -10,6 +10,12 @@ const utils = require('@unocss/preset-mini/utils');
|
|
|
10
10
|
const variants$1 = require('@unocss/preset-mini/variants');
|
|
11
11
|
|
|
12
12
|
const animations = [
|
|
13
|
+
[/^keyframes-(.+)$/, ([, name], { theme, constructCSS }) => {
|
|
14
|
+
const kf = theme.animation?.keyframes?.[name];
|
|
15
|
+
if (kf)
|
|
16
|
+
return `@keyframes ${name}${kf}
|
|
17
|
+
${constructCSS({ animation: `${name}` })}`;
|
|
18
|
+
}],
|
|
13
19
|
[/^animate-(.+)$/, ([, name], { theme, constructCSS }) => {
|
|
14
20
|
const kf = theme.animation?.keyframes?.[name];
|
|
15
21
|
if (kf) {
|
|
@@ -20,15 +26,15 @@ const animations = [
|
|
|
20
26
|
${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinite` }, props))}`;
|
|
21
27
|
}
|
|
22
28
|
}],
|
|
23
|
-
[/^animate(
|
|
24
|
-
[/^animate-delay-(
|
|
29
|
+
[/^animate-(?:duration-)?(.+)$/, ([, d]) => ({ "animation-duration": utils.handler.bracket.time(d) })],
|
|
30
|
+
[/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": utils.handler.bracket.time(d) })],
|
|
25
31
|
[/^animate-(?:fill-)?mode-(forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
|
|
26
32
|
["animate-mode-none", { "animation-fill-mode": "none" }],
|
|
27
33
|
["animate-fill-mode-none", { "animation-fill-mode": "none" }],
|
|
28
34
|
[/^animate-(?:direction-)?(reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
|
|
29
35
|
["animate-normal", { "animation-direction": "normal" }],
|
|
30
36
|
["animate-direction-normal", { "animation-direction": "normal" }],
|
|
31
|
-
[/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": d.replace(/\-/g, ",
|
|
37
|
+
[/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": utils.handler.bracket(d) ?? d.replace(/\-/g, ",") })],
|
|
32
38
|
[/^animate-name-(.+)/, ([, d]) => ({ "animation-name": d })],
|
|
33
39
|
[/^animate-play(?:-state)?-(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
|
|
34
40
|
["animate-none", { animation: "none" }]
|
|
@@ -64,20 +70,7 @@ const bgGradientColorResolver = (mode) => ([, body], { theme }) => {
|
|
|
64
70
|
};
|
|
65
71
|
}
|
|
66
72
|
};
|
|
67
|
-
const bgGradientDirections = {
|
|
68
|
-
t: "top",
|
|
69
|
-
tr: "top right",
|
|
70
|
-
r: "right",
|
|
71
|
-
br: "bottom right",
|
|
72
|
-
b: "bottom",
|
|
73
|
-
bl: "bottom left",
|
|
74
|
-
l: "left",
|
|
75
|
-
tl: "top left"
|
|
76
|
-
};
|
|
77
73
|
const backgroundStyles = [
|
|
78
|
-
["bg-fixed", { "background-attachment": "fixed" }],
|
|
79
|
-
["bg-local", { "background-attachment": "local" }],
|
|
80
|
-
["bg-scroll", { "background-attachment": "scroll" }],
|
|
81
74
|
["bg-blend-multiply", { "background-blend-mode": "multiply" }],
|
|
82
75
|
["bg-blend-screen", { "background-blend-mode": "screen" }],
|
|
83
76
|
["bg-blend-overlay", { "background-blend-mode": "overlay" }],
|
|
@@ -94,43 +87,39 @@ const backgroundStyles = [
|
|
|
94
87
|
["bg-blend-color", { "background-blend-mode": "color" }],
|
|
95
88
|
["bg-blend-luminosity", { "background-blend-mode": "luminosity" }],
|
|
96
89
|
["bg-blend-normal", { "background-blend-mode": "normal" }],
|
|
97
|
-
["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
|
|
98
|
-
["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
|
|
99
|
-
["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
|
|
100
|
-
["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }],
|
|
101
90
|
[/^(?:bg-gradient-)?from-(.+)$/, bgGradientColorResolver("from")],
|
|
102
91
|
[/^(?:bg-gradient-)?to-(.+)$/, bgGradientColorResolver("to")],
|
|
103
92
|
[/^(?:bg-gradient-)?via-(.+)$/, bgGradientColorResolver("via")],
|
|
104
93
|
[/^(?:bg-gradient-)?from-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-from-opacity": utils.handler.bracket.percent(opacity) })],
|
|
105
94
|
[/^(?:bg-gradient-)?to-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-to-opacity": utils.handler.bracket.percent(opacity) })],
|
|
106
95
|
[/^(?:bg-gradient-)?via-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-via-opacity": utils.handler.bracket.percent(opacity) })],
|
|
107
|
-
[/^bg-gradient-to-([
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return { "background-image": `linear-gradient(to ${v}, var(--un-gradient-stops))` };
|
|
96
|
+
[/^bg-gradient-to-([rltb]{1,2})$/, ([, d]) => {
|
|
97
|
+
if (d in utils.positionMap)
|
|
98
|
+
return { "background-image": `linear-gradient(to ${utils.positionMap[d]}, var(--un-gradient-stops))` };
|
|
111
99
|
}],
|
|
112
100
|
["bg-none", { "background-image": "none" }],
|
|
113
|
-
["
|
|
114
|
-
["
|
|
115
|
-
["bg-
|
|
116
|
-
["bg-
|
|
117
|
-
["bg-
|
|
118
|
-
["bg-
|
|
119
|
-
["bg-
|
|
120
|
-
["bg-
|
|
121
|
-
["bg-
|
|
122
|
-
["bg-
|
|
123
|
-
["bg-
|
|
124
|
-
["bg-
|
|
101
|
+
["box-decoration-slice", { "box-decoration-break": "slice" }],
|
|
102
|
+
["box-decoration-clone", { "box-decoration-break": "clone" }],
|
|
103
|
+
["bg-auto", { "background-size": "auto" }],
|
|
104
|
+
["bg-cover", { "background-size": "cover" }],
|
|
105
|
+
["bg-contain", { "background-size": "contain" }],
|
|
106
|
+
["bg-fixed", { "background-attachment": "fixed" }],
|
|
107
|
+
["bg-local", { "background-attachment": "local" }],
|
|
108
|
+
["bg-scroll", { "background-attachment": "scroll" }],
|
|
109
|
+
["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
|
|
110
|
+
["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
|
|
111
|
+
["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
|
|
112
|
+
["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }],
|
|
113
|
+
[/^bg-([-\w]{3,})$/, ([, s]) => ({ "background-position": utils.positionMap[s] })],
|
|
125
114
|
["bg-repeat", { "background-repeat": "repeat" }],
|
|
126
115
|
["bg-no-repeat", { "background-repeat": "no-repeat" }],
|
|
127
116
|
["bg-repeat-x", { "background-position": "repeat-x" }],
|
|
128
117
|
["bg-repeat-y", { "background-position": "repeat-y" }],
|
|
129
118
|
["bg-repeat-round", { "background-position": "round" }],
|
|
130
119
|
["bg-repeat-space", { "background-position": "space" }],
|
|
131
|
-
["bg-
|
|
132
|
-
["bg-
|
|
133
|
-
["bg-
|
|
120
|
+
["bg-origin-border", { "background-origin": "border-box" }],
|
|
121
|
+
["bg-origin-padding", { "background-origin": "padding-box" }],
|
|
122
|
+
["bg-origin-content", { "background-origin": "content-box" }]
|
|
134
123
|
];
|
|
135
124
|
|
|
136
125
|
const listStyleProps = ["disc", "circle", "square", "decimal", "zero-decimal", "greek", "roman", "upper-roman", "alpha", "upper-alpha"];
|
|
@@ -149,10 +138,6 @@ const listStyle = [
|
|
|
149
138
|
[/^list-(outside|inside)$/, ([, value]) => ({ "list-style-position": value })],
|
|
150
139
|
["list-none", { "list-style-type": "none" }]
|
|
151
140
|
];
|
|
152
|
-
const boxDecorationBreaks = [
|
|
153
|
-
["decoration-slice", { "box-decoration-break": "slice" }],
|
|
154
|
-
["decoration-clone", { "box-decoration-break": "clone" }]
|
|
155
|
-
];
|
|
156
141
|
const accentOpacity = [
|
|
157
142
|
[/^accent-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-accent-opacity": utils.handler.bracket.percent(d) })]
|
|
158
143
|
];
|
|
@@ -176,18 +161,15 @@ const imageRenderings = [
|
|
|
176
161
|
["image-rendering", "pixelated"]
|
|
177
162
|
]]
|
|
178
163
|
];
|
|
179
|
-
const overflowValues = [
|
|
180
|
-
"auto",
|
|
181
|
-
"hidden",
|
|
182
|
-
"visible",
|
|
183
|
-
"scroll",
|
|
184
|
-
"contain"
|
|
185
|
-
];
|
|
186
164
|
const overscrolls = [
|
|
187
|
-
[
|
|
165
|
+
["overscroll-auto", { "overscroll-behavior": "auto" }],
|
|
166
|
+
["overscroll-contain", { "overscroll-behavior": "contain" }],
|
|
188
167
|
["overscroll-none", { "overscroll-behavior": "none" }],
|
|
189
|
-
[
|
|
168
|
+
["overscroll-x-auto", { "overscroll-behavior-x": "auto" }],
|
|
169
|
+
["overscroll-x-contain", { "overscroll-behavior-x": "contain" }],
|
|
190
170
|
["overscroll-x-none", { "overscroll-behavior-x": "none" }],
|
|
171
|
+
["overscroll-y-auto", { "overscroll-behavior-y": "auto" }],
|
|
172
|
+
["overscroll-y-contain", { "overscroll-behavior-y": "contain" }],
|
|
191
173
|
["overscroll-y-none", { "overscroll-behavior-y": "none" }]
|
|
192
174
|
];
|
|
193
175
|
const scrollBehaviors = [
|
|
@@ -325,7 +307,7 @@ const mixBlendModes = [
|
|
|
325
307
|
["mix-blend-lighten", { "mix-blend-mode": "lighten" }],
|
|
326
308
|
["mix-blend-color-dodge", { "mix-blend-mode": "color-dodge" }],
|
|
327
309
|
["mix-blend-color-burn", { "mix-blend-mode": "color-burn" }],
|
|
328
|
-
["mix-blend-
|
|
310
|
+
["mix-blend-hard-light", { "mix-blend-mode": "hard-light" }],
|
|
329
311
|
["mix-blend-soft-light", { "mix-blend-mode": "soft-light" }],
|
|
330
312
|
["mix-blend-difference", { "mix-blend-mode": "difference" }],
|
|
331
313
|
["mix-blend-exclusion", { "mix-blend-mode": "exclusion" }],
|
|
@@ -426,17 +408,7 @@ const objectPositions = [
|
|
|
426
408
|
["object-fill", { "object-fit": "fill" }],
|
|
427
409
|
["object-scale-down", { "object-fit": "scale-down" }],
|
|
428
410
|
["object-none", { "object-fit": "none" }],
|
|
429
|
-
[
|
|
430
|
-
["object-bottom", { "object-position": "bottom" }],
|
|
431
|
-
["object-top", { "object-position": "top" }],
|
|
432
|
-
["object-right", { "object-position": "right" }],
|
|
433
|
-
["object-left", { "object-position": "left" }],
|
|
434
|
-
["object-lb", { "object-position": "left bottom" }],
|
|
435
|
-
["object-lt", { "object-position": "left top" }],
|
|
436
|
-
["object-rb", { "object-position": "right bottom" }],
|
|
437
|
-
["object-rt", { "object-position": "right top" }],
|
|
438
|
-
["object-cb", { "object-position": "center bottom" }],
|
|
439
|
-
["object-ct", { "object-position": "center top" }]
|
|
411
|
+
[/^object-([\w]+)$/, ([, s]) => ({ "object-position": utils.positionMap[s] })]
|
|
440
412
|
];
|
|
441
413
|
|
|
442
414
|
const tables = [
|
|
@@ -655,7 +627,6 @@ const rules = [
|
|
|
655
627
|
rules$1.breaks,
|
|
656
628
|
rules$1.borders,
|
|
657
629
|
rules$1.bgColors,
|
|
658
|
-
boxDecorationBreaks,
|
|
659
630
|
backgroundStyles,
|
|
660
631
|
rules$1.svgUtilities,
|
|
661
632
|
objectPositions,
|
|
@@ -854,11 +825,20 @@ const variantColorsScheme = [
|
|
|
854
825
|
utils.variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
|
|
855
826
|
];
|
|
856
827
|
|
|
857
|
-
const
|
|
828
|
+
const variantSpaceAndDivide = (matcher) => {
|
|
829
|
+
if (/^space-?([xy])-?(-?.+)$/.test(matcher) || /^divide-/.test(matcher)) {
|
|
830
|
+
return {
|
|
831
|
+
matcher,
|
|
832
|
+
selector: (input) => {
|
|
833
|
+
return `${input}>:not([hidden])~:not([hidden])`;
|
|
834
|
+
}
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
};
|
|
858
838
|
|
|
859
839
|
const variants = [
|
|
840
|
+
variantSpaceAndDivide,
|
|
860
841
|
...variants$1.variants,
|
|
861
|
-
variantFilePseudoElement,
|
|
862
842
|
...variantColorsScheme
|
|
863
843
|
];
|
|
864
844
|
|
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,16 @@ import { toArray } from '@unocss/core';
|
|
|
2
2
|
import { theme as theme$1 } from '@unocss/preset-mini/theme';
|
|
3
3
|
export { colors } from '@unocss/preset-mini';
|
|
4
4
|
import { varEmpty, cssVariables as cssVariables$1, pointerEvents, appearances, positions, insets, zIndexes, orders, grids, floats, margins, boxSizing, displays, aspectRatio, sizes, flex, transforms, cursors, userSelects, resizes, appearance, placements, alignments, justifies, gaps, overflows, textOverflows, whitespaces, breaks, borders, bgColors, svgUtilities, paddings, textAligns, textIndents, verticalAligns, fonts, fontStyles, textColors, textDecorations, fontSmoothings, tabSizes, textStrokes, textShadows, opacity, boxShadows, outline, rings, transitions, willChange, contents, questionMark } from '@unocss/preset-mini/rules';
|
|
5
|
-
import { handler, parseColor, colorResolver, directionSize, directionMap, variantMatcher, variantParentMatcher } from '@unocss/preset-mini/utils';
|
|
5
|
+
import { handler, positionMap, parseColor, colorResolver, directionSize, directionMap, variantMatcher, variantParentMatcher } from '@unocss/preset-mini/utils';
|
|
6
6
|
import { CONTROL_BYPASS_PSEUDO_CLASS, variants as variants$1 } from '@unocss/preset-mini/variants';
|
|
7
7
|
|
|
8
8
|
const animations = [
|
|
9
|
+
[/^keyframes-(.+)$/, ([, name], { theme, constructCSS }) => {
|
|
10
|
+
const kf = theme.animation?.keyframes?.[name];
|
|
11
|
+
if (kf)
|
|
12
|
+
return `@keyframes ${name}${kf}
|
|
13
|
+
${constructCSS({ animation: `${name}` })}`;
|
|
14
|
+
}],
|
|
9
15
|
[/^animate-(.+)$/, ([, name], { theme, constructCSS }) => {
|
|
10
16
|
const kf = theme.animation?.keyframes?.[name];
|
|
11
17
|
if (kf) {
|
|
@@ -16,15 +22,15 @@ const animations = [
|
|
|
16
22
|
${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinite` }, props))}`;
|
|
17
23
|
}
|
|
18
24
|
}],
|
|
19
|
-
[/^animate(
|
|
20
|
-
[/^animate-delay-(
|
|
25
|
+
[/^animate-(?:duration-)?(.+)$/, ([, d]) => ({ "animation-duration": handler.bracket.time(d) })],
|
|
26
|
+
[/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": handler.bracket.time(d) })],
|
|
21
27
|
[/^animate-(?:fill-)?mode-(forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
|
|
22
28
|
["animate-mode-none", { "animation-fill-mode": "none" }],
|
|
23
29
|
["animate-fill-mode-none", { "animation-fill-mode": "none" }],
|
|
24
30
|
[/^animate-(?:direction-)?(reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
|
|
25
31
|
["animate-normal", { "animation-direction": "normal" }],
|
|
26
32
|
["animate-direction-normal", { "animation-direction": "normal" }],
|
|
27
|
-
[/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": d.replace(/\-/g, ",
|
|
33
|
+
[/^animate-(?:iteration-)?count-(.+)$/, ([, d]) => ({ "animation-iteration-count": handler.bracket(d) ?? d.replace(/\-/g, ",") })],
|
|
28
34
|
[/^animate-name-(.+)/, ([, d]) => ({ "animation-name": d })],
|
|
29
35
|
[/^animate-play(?:-state)?-(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
|
|
30
36
|
["animate-none", { animation: "none" }]
|
|
@@ -60,20 +66,7 @@ const bgGradientColorResolver = (mode) => ([, body], { theme }) => {
|
|
|
60
66
|
};
|
|
61
67
|
}
|
|
62
68
|
};
|
|
63
|
-
const bgGradientDirections = {
|
|
64
|
-
t: "top",
|
|
65
|
-
tr: "top right",
|
|
66
|
-
r: "right",
|
|
67
|
-
br: "bottom right",
|
|
68
|
-
b: "bottom",
|
|
69
|
-
bl: "bottom left",
|
|
70
|
-
l: "left",
|
|
71
|
-
tl: "top left"
|
|
72
|
-
};
|
|
73
69
|
const backgroundStyles = [
|
|
74
|
-
["bg-fixed", { "background-attachment": "fixed" }],
|
|
75
|
-
["bg-local", { "background-attachment": "local" }],
|
|
76
|
-
["bg-scroll", { "background-attachment": "scroll" }],
|
|
77
70
|
["bg-blend-multiply", { "background-blend-mode": "multiply" }],
|
|
78
71
|
["bg-blend-screen", { "background-blend-mode": "screen" }],
|
|
79
72
|
["bg-blend-overlay", { "background-blend-mode": "overlay" }],
|
|
@@ -90,43 +83,39 @@ const backgroundStyles = [
|
|
|
90
83
|
["bg-blend-color", { "background-blend-mode": "color" }],
|
|
91
84
|
["bg-blend-luminosity", { "background-blend-mode": "luminosity" }],
|
|
92
85
|
["bg-blend-normal", { "background-blend-mode": "normal" }],
|
|
93
|
-
["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
|
|
94
|
-
["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
|
|
95
|
-
["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
|
|
96
|
-
["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }],
|
|
97
86
|
[/^(?:bg-gradient-)?from-(.+)$/, bgGradientColorResolver("from")],
|
|
98
87
|
[/^(?:bg-gradient-)?to-(.+)$/, bgGradientColorResolver("to")],
|
|
99
88
|
[/^(?:bg-gradient-)?via-(.+)$/, bgGradientColorResolver("via")],
|
|
100
89
|
[/^(?:bg-gradient-)?from-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-from-opacity": handler.bracket.percent(opacity) })],
|
|
101
90
|
[/^(?:bg-gradient-)?to-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-to-opacity": handler.bracket.percent(opacity) })],
|
|
102
91
|
[/^(?:bg-gradient-)?via-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-via-opacity": handler.bracket.percent(opacity) })],
|
|
103
|
-
[/^bg-gradient-to-([
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return { "background-image": `linear-gradient(to ${v}, var(--un-gradient-stops))` };
|
|
92
|
+
[/^bg-gradient-to-([rltb]{1,2})$/, ([, d]) => {
|
|
93
|
+
if (d in positionMap)
|
|
94
|
+
return { "background-image": `linear-gradient(to ${positionMap[d]}, var(--un-gradient-stops))` };
|
|
107
95
|
}],
|
|
108
96
|
["bg-none", { "background-image": "none" }],
|
|
109
|
-
["
|
|
110
|
-
["
|
|
111
|
-
["bg-
|
|
112
|
-
["bg-
|
|
113
|
-
["bg-
|
|
114
|
-
["bg-
|
|
115
|
-
["bg-
|
|
116
|
-
["bg-
|
|
117
|
-
["bg-
|
|
118
|
-
["bg-
|
|
119
|
-
["bg-
|
|
120
|
-
["bg-
|
|
97
|
+
["box-decoration-slice", { "box-decoration-break": "slice" }],
|
|
98
|
+
["box-decoration-clone", { "box-decoration-break": "clone" }],
|
|
99
|
+
["bg-auto", { "background-size": "auto" }],
|
|
100
|
+
["bg-cover", { "background-size": "cover" }],
|
|
101
|
+
["bg-contain", { "background-size": "contain" }],
|
|
102
|
+
["bg-fixed", { "background-attachment": "fixed" }],
|
|
103
|
+
["bg-local", { "background-attachment": "local" }],
|
|
104
|
+
["bg-scroll", { "background-attachment": "scroll" }],
|
|
105
|
+
["bg-clip-border", { "-webkit-background-clip": "border-box", "background-attachment": "border-box" }],
|
|
106
|
+
["bg-clip-content", { "-webkit-background-clip": "content-box", "background-attachment": "content-box" }],
|
|
107
|
+
["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-attachment": "padding-box" }],
|
|
108
|
+
["bg-clip-text", { "-webkit-background-clip": "text", "background-attachment": "text" }],
|
|
109
|
+
[/^bg-([-\w]{3,})$/, ([, s]) => ({ "background-position": positionMap[s] })],
|
|
121
110
|
["bg-repeat", { "background-repeat": "repeat" }],
|
|
122
111
|
["bg-no-repeat", { "background-repeat": "no-repeat" }],
|
|
123
112
|
["bg-repeat-x", { "background-position": "repeat-x" }],
|
|
124
113
|
["bg-repeat-y", { "background-position": "repeat-y" }],
|
|
125
114
|
["bg-repeat-round", { "background-position": "round" }],
|
|
126
115
|
["bg-repeat-space", { "background-position": "space" }],
|
|
127
|
-
["bg-
|
|
128
|
-
["bg-
|
|
129
|
-
["bg-
|
|
116
|
+
["bg-origin-border", { "background-origin": "border-box" }],
|
|
117
|
+
["bg-origin-padding", { "background-origin": "padding-box" }],
|
|
118
|
+
["bg-origin-content", { "background-origin": "content-box" }]
|
|
130
119
|
];
|
|
131
120
|
|
|
132
121
|
const listStyleProps = ["disc", "circle", "square", "decimal", "zero-decimal", "greek", "roman", "upper-roman", "alpha", "upper-alpha"];
|
|
@@ -145,10 +134,6 @@ const listStyle = [
|
|
|
145
134
|
[/^list-(outside|inside)$/, ([, value]) => ({ "list-style-position": value })],
|
|
146
135
|
["list-none", { "list-style-type": "none" }]
|
|
147
136
|
];
|
|
148
|
-
const boxDecorationBreaks = [
|
|
149
|
-
["decoration-slice", { "box-decoration-break": "slice" }],
|
|
150
|
-
["decoration-clone", { "box-decoration-break": "clone" }]
|
|
151
|
-
];
|
|
152
137
|
const accentOpacity = [
|
|
153
138
|
[/^accent-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-accent-opacity": handler.bracket.percent(d) })]
|
|
154
139
|
];
|
|
@@ -172,18 +157,15 @@ const imageRenderings = [
|
|
|
172
157
|
["image-rendering", "pixelated"]
|
|
173
158
|
]]
|
|
174
159
|
];
|
|
175
|
-
const overflowValues = [
|
|
176
|
-
"auto",
|
|
177
|
-
"hidden",
|
|
178
|
-
"visible",
|
|
179
|
-
"scroll",
|
|
180
|
-
"contain"
|
|
181
|
-
];
|
|
182
160
|
const overscrolls = [
|
|
183
|
-
[
|
|
161
|
+
["overscroll-auto", { "overscroll-behavior": "auto" }],
|
|
162
|
+
["overscroll-contain", { "overscroll-behavior": "contain" }],
|
|
184
163
|
["overscroll-none", { "overscroll-behavior": "none" }],
|
|
185
|
-
[
|
|
164
|
+
["overscroll-x-auto", { "overscroll-behavior-x": "auto" }],
|
|
165
|
+
["overscroll-x-contain", { "overscroll-behavior-x": "contain" }],
|
|
186
166
|
["overscroll-x-none", { "overscroll-behavior-x": "none" }],
|
|
167
|
+
["overscroll-y-auto", { "overscroll-behavior-y": "auto" }],
|
|
168
|
+
["overscroll-y-contain", { "overscroll-behavior-y": "contain" }],
|
|
187
169
|
["overscroll-y-none", { "overscroll-behavior-y": "none" }]
|
|
188
170
|
];
|
|
189
171
|
const scrollBehaviors = [
|
|
@@ -321,7 +303,7 @@ const mixBlendModes = [
|
|
|
321
303
|
["mix-blend-lighten", { "mix-blend-mode": "lighten" }],
|
|
322
304
|
["mix-blend-color-dodge", { "mix-blend-mode": "color-dodge" }],
|
|
323
305
|
["mix-blend-color-burn", { "mix-blend-mode": "color-burn" }],
|
|
324
|
-
["mix-blend-
|
|
306
|
+
["mix-blend-hard-light", { "mix-blend-mode": "hard-light" }],
|
|
325
307
|
["mix-blend-soft-light", { "mix-blend-mode": "soft-light" }],
|
|
326
308
|
["mix-blend-difference", { "mix-blend-mode": "difference" }],
|
|
327
309
|
["mix-blend-exclusion", { "mix-blend-mode": "exclusion" }],
|
|
@@ -422,17 +404,7 @@ const objectPositions = [
|
|
|
422
404
|
["object-fill", { "object-fit": "fill" }],
|
|
423
405
|
["object-scale-down", { "object-fit": "scale-down" }],
|
|
424
406
|
["object-none", { "object-fit": "none" }],
|
|
425
|
-
[
|
|
426
|
-
["object-bottom", { "object-position": "bottom" }],
|
|
427
|
-
["object-top", { "object-position": "top" }],
|
|
428
|
-
["object-right", { "object-position": "right" }],
|
|
429
|
-
["object-left", { "object-position": "left" }],
|
|
430
|
-
["object-lb", { "object-position": "left bottom" }],
|
|
431
|
-
["object-lt", { "object-position": "left top" }],
|
|
432
|
-
["object-rb", { "object-position": "right bottom" }],
|
|
433
|
-
["object-rt", { "object-position": "right top" }],
|
|
434
|
-
["object-cb", { "object-position": "center bottom" }],
|
|
435
|
-
["object-ct", { "object-position": "center top" }]
|
|
407
|
+
[/^object-([\w]+)$/, ([, s]) => ({ "object-position": positionMap[s] })]
|
|
436
408
|
];
|
|
437
409
|
|
|
438
410
|
const tables = [
|
|
@@ -651,7 +623,6 @@ const rules = [
|
|
|
651
623
|
breaks,
|
|
652
624
|
borders,
|
|
653
625
|
bgColors,
|
|
654
|
-
boxDecorationBreaks,
|
|
655
626
|
backgroundStyles,
|
|
656
627
|
svgUtilities,
|
|
657
628
|
objectPositions,
|
|
@@ -850,11 +821,20 @@ const variantColorsScheme = [
|
|
|
850
821
|
variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
|
|
851
822
|
];
|
|
852
823
|
|
|
853
|
-
const
|
|
824
|
+
const variantSpaceAndDivide = (matcher) => {
|
|
825
|
+
if (/^space-?([xy])-?(-?.+)$/.test(matcher) || /^divide-/.test(matcher)) {
|
|
826
|
+
return {
|
|
827
|
+
matcher,
|
|
828
|
+
selector: (input) => {
|
|
829
|
+
return `${input}>:not([hidden])~:not([hidden])`;
|
|
830
|
+
}
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
};
|
|
854
834
|
|
|
855
835
|
const variants = [
|
|
836
|
+
variantSpaceAndDivide,
|
|
856
837
|
...variants$1,
|
|
857
|
-
variantFilePseudoElement,
|
|
858
838
|
...variantColorsScheme
|
|
859
839
|
];
|
|
860
840
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.4",
|
|
4
4
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"*.css"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/core": "0.20.
|
|
39
|
-
"@unocss/preset-mini": "0.20.
|
|
38
|
+
"@unocss/core": "0.20.4",
|
|
39
|
+
"@unocss/preset-mini": "0.20.4"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|