@unocss/preset-wind 0.39.1 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Tailwind / Windi CSS compact preset for [UnoCSS](https://github.com/unocss/unocss).
|
|
4
4
|
|
|
5
|
+
> This preset inherits
|
|
6
|
+
> - [@unocss/preset-mini](https://github.com/antfu/unocss/tree/main/packages/preset-mini)
|
|
7
|
+
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
7
10
|
```bash
|
|
@@ -18,6 +21,24 @@ Unocss({
|
|
|
18
21
|
})
|
|
19
22
|
```
|
|
20
23
|
|
|
24
|
+
## Differences from Windi CSS
|
|
25
|
+
|
|
26
|
+
### `<sm` `@lg` Variants
|
|
27
|
+
|
|
28
|
+
- `<sm:p-1` -> `lt-sm:p-1`
|
|
29
|
+
- `@lg:p-1` -> `at-lg:p-1`
|
|
30
|
+
- `>xl:p-1` -> `gt-lg:p-1`
|
|
31
|
+
|
|
32
|
+
to have more consistent naming.
|
|
33
|
+
|
|
34
|
+
### Bracket Syntax Spaces
|
|
35
|
+
|
|
36
|
+
This preset uses `_` instead of `,` for respecting space in bracket syntax.
|
|
37
|
+
|
|
38
|
+
- `grid-cols-[1fr,10px,max-content]` -> `grid-cols-[1fr_10px_max-content]`
|
|
39
|
+
|
|
40
|
+
since some CSS rules require `,` as parts of the value, e.g. `grid-cols-[repeat(3,auto)]`
|
|
41
|
+
|
|
21
42
|
## License
|
|
22
43
|
|
|
23
44
|
MIT License © 2021-PRESENT [Anthony Fu](https://github.com/antfu)
|
package/dist/index.cjs
CHANGED
|
@@ -134,11 +134,11 @@ const backgroundStyles = [
|
|
|
134
134
|
}],
|
|
135
135
|
[/^(?:bg-gradient-)?stops-(\[.+\])$/, ([, s]) => ({ "--un-gradient-stops": utils.handler.bracket(s) })],
|
|
136
136
|
[/^(?:bg-gradient-)?from-(.+)$/, bgGradientColorResolver("from")],
|
|
137
|
-
[/^(?:bg-gradient-)?to-(.+)$/, bgGradientColorResolver("to")],
|
|
138
137
|
[/^(?:bg-gradient-)?via-(.+)$/, bgGradientColorResolver("via")],
|
|
138
|
+
[/^(?:bg-gradient-)?to-(.+)$/, bgGradientColorResolver("to")],
|
|
139
139
|
[/^(?:bg-gradient-)?from-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-from-opacity": utils.handler.bracket.percent(opacity) })],
|
|
140
|
-
[/^(?:bg-gradient-)?to-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-to-opacity": utils.handler.bracket.percent(opacity) })],
|
|
141
140
|
[/^(?:bg-gradient-)?via-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-via-opacity": utils.handler.bracket.percent(opacity) })],
|
|
141
|
+
[/^(?:bg-gradient-)?to-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-to-opacity": utils.handler.bracket.percent(opacity) })],
|
|
142
142
|
[/^bg-gradient-((?:repeating-)?(?:linear|radial|conic))$/, ([, s]) => ({
|
|
143
143
|
"background-image": `${s}-gradient(var(--un-gradient, var(--un-gradient-stops, rgba(255, 255, 255, 0))))`
|
|
144
144
|
}), { autocomplete: ["bg-gradient-repeating", "bg-gradient-(linear|radial|conic)", "bg-gradient-repeating-(linear|radial|conic)"] }],
|
|
@@ -1040,12 +1040,12 @@ const theme = {
|
|
|
1040
1040
|
};
|
|
1041
1041
|
|
|
1042
1042
|
const variantCombinators = [
|
|
1043
|
-
utils.variantMatcher("svg", (input) => `${input} svg`)
|
|
1043
|
+
utils.variantMatcher("svg", (input) => ({ selector: `${input.selector} svg` }))
|
|
1044
1044
|
];
|
|
1045
1045
|
|
|
1046
1046
|
const variantColorsScheme = [
|
|
1047
|
-
utils.variantMatcher(".dark", (input) =>
|
|
1048
|
-
utils.variantMatcher(".light", (input) =>
|
|
1047
|
+
utils.variantMatcher(".dark", (input) => ({ prefix: `${input.prefix}.dark $$ ` })),
|
|
1048
|
+
utils.variantMatcher(".light", (input) => ({ prefix: `${input.prefix}.light $$ ` })),
|
|
1049
1049
|
utils.variantParentMatcher("@dark", "@media (prefers-color-scheme: dark)"),
|
|
1050
1050
|
utils.variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
|
|
1051
1051
|
];
|
package/dist/index.mjs
CHANGED
|
@@ -131,11 +131,11 @@ const backgroundStyles = [
|
|
|
131
131
|
}],
|
|
132
132
|
[/^(?:bg-gradient-)?stops-(\[.+\])$/, ([, s]) => ({ "--un-gradient-stops": handler.bracket(s) })],
|
|
133
133
|
[/^(?:bg-gradient-)?from-(.+)$/, bgGradientColorResolver("from")],
|
|
134
|
-
[/^(?:bg-gradient-)?to-(.+)$/, bgGradientColorResolver("to")],
|
|
135
134
|
[/^(?:bg-gradient-)?via-(.+)$/, bgGradientColorResolver("via")],
|
|
135
|
+
[/^(?:bg-gradient-)?to-(.+)$/, bgGradientColorResolver("to")],
|
|
136
136
|
[/^(?:bg-gradient-)?from-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-from-opacity": handler.bracket.percent(opacity) })],
|
|
137
|
-
[/^(?:bg-gradient-)?to-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-to-opacity": handler.bracket.percent(opacity) })],
|
|
138
137
|
[/^(?:bg-gradient-)?via-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-via-opacity": handler.bracket.percent(opacity) })],
|
|
138
|
+
[/^(?:bg-gradient-)?to-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-to-opacity": handler.bracket.percent(opacity) })],
|
|
139
139
|
[/^bg-gradient-((?:repeating-)?(?:linear|radial|conic))$/, ([, s]) => ({
|
|
140
140
|
"background-image": `${s}-gradient(var(--un-gradient, var(--un-gradient-stops, rgba(255, 255, 255, 0))))`
|
|
141
141
|
}), { autocomplete: ["bg-gradient-repeating", "bg-gradient-(linear|radial|conic)", "bg-gradient-repeating-(linear|radial|conic)"] }],
|
|
@@ -1037,12 +1037,12 @@ const theme = {
|
|
|
1037
1037
|
};
|
|
1038
1038
|
|
|
1039
1039
|
const variantCombinators = [
|
|
1040
|
-
variantMatcher("svg", (input) => `${input} svg`)
|
|
1040
|
+
variantMatcher("svg", (input) => ({ selector: `${input.selector} svg` }))
|
|
1041
1041
|
];
|
|
1042
1042
|
|
|
1043
1043
|
const variantColorsScheme = [
|
|
1044
|
-
variantMatcher(".dark", (input) =>
|
|
1045
|
-
variantMatcher(".light", (input) =>
|
|
1044
|
+
variantMatcher(".dark", (input) => ({ prefix: `${input.prefix}.dark $$ ` })),
|
|
1045
|
+
variantMatcher(".light", (input) => ({ prefix: `${input.prefix}.light $$ ` })),
|
|
1046
1046
|
variantParentMatcher("@dark", "@media (prefers-color-scheme: dark)"),
|
|
1047
1047
|
variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
|
|
1048
1048
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"*.css"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/core": "0.
|
|
39
|
-
"@unocss/preset-mini": "0.
|
|
38
|
+
"@unocss/core": "0.40.0",
|
|
39
|
+
"@unocss/preset-mini": "0.40.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|