@unocss/preset-mini 0.53.0 → 0.53.1
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 +6 -6
- package/dist/index.mjs +7 -7
- package/dist/rules.cjs +3 -3
- package/dist/rules.mjs +3 -3
- package/dist/shared/{preset-mini.099ab35c.cjs → preset-mini.02aa6651.cjs} +5 -5
- package/dist/shared/{preset-mini.64d922d5.mjs → preset-mini.08cdeeea.mjs} +6 -6
- package/dist/shared/{preset-mini.82cf398e.mjs → preset-mini.19364a2e.mjs} +20 -20
- package/dist/shared/{preset-mini.8d9dbf2c.cjs → preset-mini.473275f7.cjs} +20 -20
- package/dist/shared/{preset-mini.7577b1bf.mjs → preset-mini.629d3881.mjs} +25 -25
- package/dist/shared/{preset-mini.b9e9b262.cjs → preset-mini.62c94926.cjs} +2 -2
- package/dist/shared/{preset-mini.dfb70bd4.cjs → preset-mini.89cf0040.cjs} +25 -25
- package/dist/shared/{preset-mini.6babd10a.mjs → preset-mini.a201ed79.mjs} +58 -58
- package/dist/shared/{preset-mini.c3ab5ec7.cjs → preset-mini.c1922eb8.cjs} +1 -1
- package/dist/shared/{preset-mini.422a3875.mjs → preset-mini.c5ebe4cd.mjs} +2 -2
- package/dist/shared/{preset-mini.60fa5b43.cjs → preset-mini.daaac022.cjs} +58 -58
- package/dist/shared/{preset-mini.bd1a81a2.mjs → preset-mini.e2fa1eff.mjs} +1 -1
- package/dist/theme.cjs +3 -3
- package/dist/theme.mjs +3 -3
- package/dist/utils.cjs +2 -2
- package/dist/utils.mjs +2 -2
- package/dist/variants.cjs +3 -3
- package/dist/variants.mjs +3 -3
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const transform = require('./preset-mini.
|
|
4
|
-
const colors = require('./preset-mini.
|
|
3
|
+
const transform = require('./preset-mini.daaac022.cjs');
|
|
4
|
+
const colors = require('./preset-mini.02aa6651.cjs');
|
|
5
5
|
const core = require('@unocss/core');
|
|
6
6
|
|
|
7
7
|
const containerParent = [
|
|
@@ -18,14 +18,14 @@ const flex = [
|
|
|
18
18
|
["flex", { display: "flex" }],
|
|
19
19
|
["inline-flex", { display: "inline-flex" }],
|
|
20
20
|
["flex-inline", { display: "inline-flex" }],
|
|
21
|
-
[/^flex-(.*)$/, ([, d]) => ({ flex: colors.
|
|
21
|
+
[/^flex-(.*)$/, ([, d]) => ({ flex: colors.h.bracket(d) != null ? colors.h.bracket(d).split(" ").map((e) => colors.h.cssvar.fraction(e) ?? e).join(" ") : colors.h.cssvar.fraction(d) })],
|
|
22
22
|
["flex-1", { flex: "1 1 0%" }],
|
|
23
23
|
["flex-auto", { flex: "1 1 auto" }],
|
|
24
24
|
["flex-initial", { flex: "0 1 auto" }],
|
|
25
25
|
["flex-none", { flex: "none" }],
|
|
26
|
-
[/^(?:flex-)?shrink(?:-(.*))?$/, ([, d = ""]) => ({ "flex-shrink": colors.
|
|
27
|
-
[/^(?:flex-)?grow(?:-(.*))?$/, ([, d = ""]) => ({ "flex-grow": colors.
|
|
28
|
-
[/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? colors.
|
|
26
|
+
[/^(?:flex-)?shrink(?:-(.*))?$/, ([, d = ""]) => ({ "flex-shrink": colors.h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-shrink-<num>", "shrink-<num>"] }],
|
|
27
|
+
[/^(?:flex-)?grow(?:-(.*))?$/, ([, d = ""]) => ({ "flex-grow": colors.h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-grow-<num>", "grow-<num>"] }],
|
|
28
|
+
[/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? colors.h.bracket.cssvar.auto.fraction.rem(d) }), { autocomplete: ["flex-basis-$spacing", "basis-$spacing"] }],
|
|
29
29
|
["flex-row", { "flex-direction": "row" }],
|
|
30
30
|
["flex-row-reverse", { "flex-direction": "row-reverse" }],
|
|
31
31
|
["flex-col", { "flex-direction": "column" }],
|
|
@@ -41,7 +41,7 @@ const directions = {
|
|
|
41
41
|
"y": "row-"
|
|
42
42
|
};
|
|
43
43
|
function handleGap([, d = "", s], { theme }) {
|
|
44
|
-
const v = theme.spacing?.[s] ?? colors.
|
|
44
|
+
const v = theme.spacing?.[s] ?? colors.h.bracket.cssvar.global.rem(s);
|
|
45
45
|
if (v != null) {
|
|
46
46
|
return {
|
|
47
47
|
[`grid-${directions[d]}gap`]: v,
|
|
@@ -72,35 +72,35 @@ function autoDirection(c, theme, prop) {
|
|
|
72
72
|
case "fr":
|
|
73
73
|
return "minmax(0,1fr)";
|
|
74
74
|
}
|
|
75
|
-
return colors.
|
|
75
|
+
return colors.h.bracket.cssvar.auto.rem(prop);
|
|
76
76
|
}
|
|
77
77
|
const grids = [
|
|
78
78
|
["grid", { display: "grid" }],
|
|
79
79
|
["inline-grid", { display: "inline-grid" }],
|
|
80
80
|
[/^(?:grid-)?(row|col)-(.+)$/, ([, c, v], { theme }) => ({
|
|
81
|
-
[`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? colors.
|
|
81
|
+
[`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? colors.h.bracket.cssvar.auto(v)
|
|
82
82
|
})],
|
|
83
83
|
[/^(?:grid-)?(row|col)-span-(.+)$/, ([, c, s]) => {
|
|
84
84
|
if (s === "full")
|
|
85
85
|
return { [`grid-${rowCol(c)}`]: "1/-1" };
|
|
86
|
-
const v = colors.
|
|
86
|
+
const v = colors.h.bracket.number(s);
|
|
87
87
|
if (v != null)
|
|
88
88
|
return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
|
|
89
89
|
}, { autocomplete: ["grid-(row|col)-span-<num>", "(row|col)-span-<num>"] }],
|
|
90
|
-
[/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: colors.
|
|
91
|
-
[/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: colors.
|
|
90
|
+
[/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: colors.h.bracket.cssvar(v) ?? v })],
|
|
91
|
+
[/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: colors.h.bracket.cssvar(v) ?? v }), { autocomplete: ["grid-(row|col)-(start|end)-<num>"] }],
|
|
92
92
|
[/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) }), { autocomplete: ["grid-auto-(rows|cols)-<num>"] }],
|
|
93
|
-
[/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": colors.
|
|
93
|
+
[/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": colors.h.bracket.cssvar(v) })],
|
|
94
94
|
[/^(?:grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)$/, ([, v]) => ({ "grid-auto-flow": rowCol(v).replace("-", " ") }), { autocomplete: ["(grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)"] }],
|
|
95
95
|
[/^grid-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({
|
|
96
|
-
[`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? colors.
|
|
96
|
+
[`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? colors.h.bracket.cssvar(v)
|
|
97
97
|
})],
|
|
98
98
|
[/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
|
|
99
99
|
[/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: ["grid-(rows|cols)-<num>", "grid-(rows|cols)-none"] }],
|
|
100
100
|
[/^grid-area(s)?-(.+)$/, ([, s, v]) => {
|
|
101
101
|
if (s != null)
|
|
102
|
-
return { "grid-template-areas": colors.
|
|
103
|
-
return { "grid-area": colors.
|
|
102
|
+
return { "grid-template-areas": colors.h.cssvar(v) ?? v.split("-").map((s2) => `"${colors.h.bracket(s2)}"`).join(" ") };
|
|
103
|
+
return { "grid-area": colors.h.bracket.cssvar(v) };
|
|
104
104
|
}],
|
|
105
105
|
["grid-rows-none", { "grid-template-rows": "none" }],
|
|
106
106
|
["grid-cols-none", { "grid-template-columns": "none" }]
|
|
@@ -126,7 +126,7 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
126
126
|
case "min":
|
|
127
127
|
return `${prop}-content`;
|
|
128
128
|
}
|
|
129
|
-
return colors.
|
|
129
|
+
return colors.h.bracket.cssvar.global.auto.fraction.rem(prop);
|
|
130
130
|
}
|
|
131
131
|
const sizes = [
|
|
132
132
|
[/^(?:size-)?(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
@@ -159,7 +159,7 @@ function getAspectRatio(prop) {
|
|
|
159
159
|
case "video":
|
|
160
160
|
return "16/9";
|
|
161
161
|
}
|
|
162
|
-
return colors.
|
|
162
|
+
return colors.h.bracket.cssvar.global.auto.number(prop);
|
|
163
163
|
}
|
|
164
164
|
const aspectRatio = [
|
|
165
165
|
[/^(?:size-)?aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
|
|
@@ -201,13 +201,13 @@ const cssVariables = [
|
|
|
201
201
|
[/^(.+?)-(\$.+)$/, ([, name, varname]) => {
|
|
202
202
|
const prop = variablesAbbrMap[name];
|
|
203
203
|
if (prop)
|
|
204
|
-
return { [prop]: colors.
|
|
204
|
+
return { [prop]: colors.h.cssvar(varname) };
|
|
205
205
|
}]
|
|
206
206
|
];
|
|
207
207
|
const cssProperty = [
|
|
208
208
|
[/^\[(--(\w|\\\W)+|[\w-]+):([^\s:]*?("\S+?"|'\S+?'|`\S+?`|[^\s:]+?)[^\s:]*?\)?)\]$/, ([match, prop, , value]) => {
|
|
209
209
|
if (!isURI(match.slice(1, -1)))
|
|
210
|
-
return { [prop]: colors.
|
|
210
|
+
return { [prop]: colors.h.bracket(`[${value}]`) };
|
|
211
211
|
}]
|
|
212
212
|
];
|
|
213
213
|
function isURI(declaration) {
|
|
@@ -233,13 +233,13 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
|
|
|
233
233
|
|
|
234
234
|
const svgUtilities = [
|
|
235
235
|
[/^fill-(.+)$/, colors.colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
|
|
236
|
-
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": colors.
|
|
236
|
+
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
|
|
237
237
|
["fill-none", { fill: "none" }],
|
|
238
|
-
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? colors.
|
|
239
|
-
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": colors.
|
|
240
|
-
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? colors.
|
|
238
|
+
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? colors.h.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
|
|
239
|
+
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": colors.h.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
|
|
240
|
+
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? colors.h.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
|
|
241
241
|
[/^stroke-(.+)$/, colors.colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
|
|
242
|
-
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": colors.
|
|
242
|
+
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
|
|
243
243
|
["stroke-cap-square", { "stroke-linecap": "square" }],
|
|
244
244
|
["stroke-cap-round", { "stroke-linecap": "round" }],
|
|
245
245
|
["stroke-cap-auto", { "stroke-linecap": "butt" }],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as globalKeywords, h
|
|
1
|
+
import { g as globalKeywords, h, c as colorResolver, d as directionMap, a as hasParseableColor, b as cornerMap, p as parseColor, e as colorToString, f as colorOpacityToString, n as numberWithUnitRE, m as makeGlobalStaticRules, s as splitShorthand, i as colorableShadows, j as insetMap, k as positionMap, x as xyzMap } from './preset-mini.08cdeeea.mjs';
|
|
2
2
|
import { toArray } from '@unocss/core';
|
|
3
3
|
|
|
4
4
|
const verticalAlignAlias = {
|
|
@@ -23,9 +23,9 @@ const verticalAligns = [
|
|
|
23
23
|
const textAligns = ["center", "left", "right", "justify", "start", "end"].map((v) => [`text-${v}`, { "text-align": v }]);
|
|
24
24
|
|
|
25
25
|
const outline = [
|
|
26
|
-
[/^outline-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "outline-width": theme.lineWidth?.[d] ??
|
|
26
|
+
[/^outline-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "outline-width": theme.lineWidth?.[d] ?? h.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(width|size)-<num>" }],
|
|
27
27
|
[/^outline-(?:color-)?(.+)$/, colorResolver("outline-color", "outline-color"), { autocomplete: "outline-$colors" }],
|
|
28
|
-
[/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ??
|
|
28
|
+
[/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ?? h.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(offset)-<num>" }],
|
|
29
29
|
["outline", { "outline-style": "solid" }],
|
|
30
30
|
...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", ...globalKeywords].map((v) => [`outline-${v}`, { "outline-style": v }]),
|
|
31
31
|
["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
|
|
@@ -37,7 +37,7 @@ const appearance = [
|
|
|
37
37
|
}]
|
|
38
38
|
];
|
|
39
39
|
function willChangeProperty(prop) {
|
|
40
|
-
return
|
|
40
|
+
return h.properties.auto.global(prop) ?? {
|
|
41
41
|
contents: "contents",
|
|
42
42
|
scroll: "scroll-position"
|
|
43
43
|
}[prop];
|
|
@@ -114,7 +114,7 @@ function handlerBorder(m, ctx) {
|
|
|
114
114
|
return handlerBorderSize(m, ctx);
|
|
115
115
|
}
|
|
116
116
|
function handlerBorderSize([, a = "", b], { theme }) {
|
|
117
|
-
const v = theme.lineWidth?.[b || "DEFAULT"] ??
|
|
117
|
+
const v = theme.lineWidth?.[b || "DEFAULT"] ?? h.bracket.cssvar.global.px(b || "1");
|
|
118
118
|
if (a in directionMap && v != null)
|
|
119
119
|
return directionMap[a].map((i) => [`border${i}-width`, v]);
|
|
120
120
|
}
|
|
@@ -127,12 +127,12 @@ function handlerBorderColor([, a = "", c], { theme }) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
function handlerBorderOpacity([, a = "", opacity]) {
|
|
130
|
-
const v =
|
|
130
|
+
const v = h.bracket.percent.cssvar(opacity);
|
|
131
131
|
if (a in directionMap && v != null)
|
|
132
132
|
return directionMap[a].map((i) => [`--un-border${i}-opacity`, v]);
|
|
133
133
|
}
|
|
134
134
|
function handlerRounded([, a = "", s], { theme }) {
|
|
135
|
-
const v = theme.borderRadius?.[s || "DEFAULT"] ||
|
|
135
|
+
const v = theme.borderRadius?.[s || "DEFAULT"] || h.bracket.cssvar.global.fraction.rem(s || "1");
|
|
136
136
|
if (a in cornerMap && v != null)
|
|
137
137
|
return cornerMap[a].map((i) => [`border${i}-radius`, v]);
|
|
138
138
|
}
|
|
@@ -142,23 +142,23 @@ function handlerBorderStyle([, a = "", s]) {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
const opacity = [
|
|
145
|
-
[/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity:
|
|
145
|
+
[/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: h.bracket.percent.cssvar(d) })]
|
|
146
146
|
];
|
|
147
147
|
const textColors = [
|
|
148
148
|
[/^(?:color|c)-(.+)$/, colorResolver("color", "text"), { autocomplete: "(color|c)-$colors" }],
|
|
149
149
|
[/^text-(.+)$/, colorResolver("color", "text", (css) => !css.color?.toString().match(numberWithUnitRE)), { autocomplete: "text-$colors" }],
|
|
150
150
|
[/^(?:text|color|c)-(.+)$/, ([, v]) => globalKeywords.includes(v) ? { color: v } : void 0, { autocomplete: `(text|color|c)-(${globalKeywords.join("|")})` }],
|
|
151
|
-
[/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity":
|
|
151
|
+
[/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
|
|
152
152
|
];
|
|
153
153
|
const bgColors = [
|
|
154
154
|
[/^bg-(.+)$/, colorResolver("background-color", "bg"), { autocomplete: "bg-$colors" }],
|
|
155
|
-
[/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity":
|
|
155
|
+
[/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
|
|
156
156
|
];
|
|
157
157
|
|
|
158
158
|
const decorationStyles = ["solid", "double", "dotted", "dashed", "wavy", ...globalKeywords];
|
|
159
159
|
const textDecorations = [
|
|
160
160
|
[/^(?:decoration-)?(underline|overline|line-through)$/, ([, s]) => ({ "text-decoration-line": s }), { autocomplete: "decoration-(underline|overline|line-through)" }],
|
|
161
|
-
[/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s], { theme }) => ({ "text-decoration-thickness": theme.lineWidth?.[s] ??
|
|
161
|
+
[/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s], { theme }) => ({ "text-decoration-thickness": theme.lineWidth?.[s] ?? h.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-<num>" }],
|
|
162
162
|
[/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s }), { autocomplete: "(underline|decoration)-(auto|from-font)" }],
|
|
163
163
|
[/^(?:underline|decoration)-(.+)$/, (match, ctx) => {
|
|
164
164
|
const result = colorResolver("text-decoration-color", "line")(match, ctx);
|
|
@@ -169,8 +169,8 @@ const textDecorations = [
|
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
}, { autocomplete: "(underline|decoration)-$colors" }],
|
|
172
|
-
[/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity":
|
|
173
|
-
[/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ??
|
|
172
|
+
[/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
|
|
173
|
+
[/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ?? h.auto.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-(offset)-<num>" }],
|
|
174
174
|
...decorationStyles.map((v) => [`underline-${v}`, { "text-decoration-style": v }]),
|
|
175
175
|
...decorationStyles.map((v) => [`decoration-${v}`, { "text-decoration-style": v }]),
|
|
176
176
|
["no-underline", { "text-decoration": "none" }],
|
|
@@ -186,13 +186,13 @@ const transitionPropertyGroup = {
|
|
|
186
186
|
transform: "transform"
|
|
187
187
|
};
|
|
188
188
|
function transitionProperty(prop) {
|
|
189
|
-
return
|
|
189
|
+
return h.properties(prop) ?? transitionPropertyGroup[prop];
|
|
190
190
|
}
|
|
191
191
|
const transitions = [
|
|
192
192
|
[/^transition(?:-([a-z-]+(?:,[a-z-]+)*))?(?:-(\d+))?$/, ([, prop, d], { theme }) => {
|
|
193
193
|
const p = prop != null ? transitionProperty(prop) : [transitionPropertyGroup.colors, "opacity", "box-shadow", "transform", "filter", "backdrop-filter"].join(",");
|
|
194
194
|
if (p) {
|
|
195
|
-
const duration = theme.duration?.[d || "DEFAULT"] ??
|
|
195
|
+
const duration = theme.duration?.[d || "DEFAULT"] ?? h.time(d || "150");
|
|
196
196
|
return {
|
|
197
197
|
"transition-property": p,
|
|
198
198
|
"transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
@@ -202,22 +202,22 @@ const transitions = [
|
|
|
202
202
|
}, { autocomplete: `transition-(${Object.keys(transitionPropertyGroup).join("|")})` }],
|
|
203
203
|
[
|
|
204
204
|
/^(?:transition-)?duration-(.+)$/,
|
|
205
|
-
([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ??
|
|
205
|
+
([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }),
|
|
206
206
|
{ autocomplete: ["transition-duration-$duration", "duration-$duration"] }
|
|
207
207
|
],
|
|
208
208
|
[
|
|
209
209
|
/^(?:transition-)?delay-(.+)$/,
|
|
210
|
-
([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ??
|
|
210
|
+
([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }),
|
|
211
211
|
{ autocomplete: ["transition-delay-$duration", "delay-$duration"] }
|
|
212
212
|
],
|
|
213
213
|
[
|
|
214
214
|
/^(?:transition-)?ease(?:-(.+))?$/,
|
|
215
|
-
([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ??
|
|
215
|
+
([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ?? h.bracket.cssvar(d) }),
|
|
216
216
|
{ autocomplete: ["transition-ease-(linear|in|out|in-out|DEFAULT)", "ease-(linear|in|out|in-out|DEFAULT)"] }
|
|
217
217
|
],
|
|
218
218
|
[
|
|
219
219
|
/^(?:transition-)?property-(.+)$/,
|
|
220
|
-
([, v]) => ({ "transition-property":
|
|
220
|
+
([, v]) => ({ "transition-property": h.bracket.global(v) || transitionProperty(v) }),
|
|
221
221
|
{ autocomplete: [`transition-property-(${[...globalKeywords, ...Object.keys(transitionPropertyGroup)].join("|")})`] }
|
|
222
222
|
],
|
|
223
223
|
["transition-none", { transition: "none" }],
|
|
@@ -236,12 +236,12 @@ const weightMap = {
|
|
|
236
236
|
black: "900"
|
|
237
237
|
};
|
|
238
238
|
function handleLineHeight(s, theme) {
|
|
239
|
-
return theme.lineHeight?.[s] ||
|
|
239
|
+
return theme.lineHeight?.[s] || h.bracket.cssvar.global.rem(s);
|
|
240
240
|
}
|
|
241
241
|
const fonts = [
|
|
242
242
|
[
|
|
243
243
|
/^font-(.+)$/,
|
|
244
|
-
([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] ||
|
|
244
|
+
([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || h.bracket.cssvar.global(d) }),
|
|
245
245
|
{ autocomplete: "font-$fontFamily" }
|
|
246
246
|
],
|
|
247
247
|
[
|
|
@@ -257,26 +257,26 @@ const fonts = [
|
|
|
257
257
|
"line-height": lineHeight ?? height ?? "1"
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
const fontSize =
|
|
260
|
+
const fontSize = h.bracketOfLength.rem(size);
|
|
261
261
|
if (lineHeight && fontSize) {
|
|
262
262
|
return {
|
|
263
263
|
"font-size": fontSize,
|
|
264
264
|
"line-height": lineHeight
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
return { "font-size":
|
|
267
|
+
return { "font-size": h.bracketOfLength.rem(s) };
|
|
268
268
|
},
|
|
269
269
|
{ autocomplete: "text-$fontSize" }
|
|
270
270
|
],
|
|
271
271
|
[/^text-size-(.+)$/, ([, s], { theme }) => {
|
|
272
272
|
const themed = toArray(theme.fontSize?.[s]);
|
|
273
|
-
const size = themed?.[0] ??
|
|
273
|
+
const size = themed?.[0] ?? h.bracket.cssvar.global.rem(s);
|
|
274
274
|
if (size != null)
|
|
275
275
|
return { "font-size": size };
|
|
276
276
|
}, { autocomplete: "text-size-$fontSize" }],
|
|
277
277
|
[
|
|
278
278
|
/^(?:font|fw)-?([^-]+)$/,
|
|
279
|
-
([, s]) => ({ "font-weight": weightMap[s] ||
|
|
279
|
+
([, s]) => ({ "font-weight": weightMap[s] || h.bracket.global.number(s) }),
|
|
280
280
|
{ autocomplete: `(font|fw)-(100|200|300|400|500|600|700|800|900|${Object.keys(weightMap).join("|")})` }
|
|
281
281
|
],
|
|
282
282
|
[
|
|
@@ -288,21 +288,21 @@ const fonts = [
|
|
|
288
288
|
["font-synthesis-style", { "font-synthesis": "style" }],
|
|
289
289
|
["font-synthesis-small-caps", { "font-synthesis": "small-caps" }],
|
|
290
290
|
["font-synthesis-none", { "font-synthesis": "none" }],
|
|
291
|
-
[/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis":
|
|
291
|
+
[/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": h.bracket.cssvar.global(s) })],
|
|
292
292
|
[
|
|
293
293
|
/^(?:font-)?tracking-(.+)$/,
|
|
294
|
-
([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] ||
|
|
294
|
+
([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || h.bracket.cssvar.global.rem(s) }),
|
|
295
295
|
{ autocomplete: "tracking-$letterSpacing" }
|
|
296
296
|
],
|
|
297
297
|
[
|
|
298
298
|
/^(?:font-)?word-spacing-(.+)$/,
|
|
299
|
-
([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] ||
|
|
299
|
+
([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || h.bracket.cssvar.global.rem(s) }),
|
|
300
300
|
{ autocomplete: "word-spacing-$wordSpacing" }
|
|
301
301
|
]
|
|
302
302
|
];
|
|
303
303
|
const tabSizes = [
|
|
304
304
|
[/^tab(?:-(.+))?$/, ([, s]) => {
|
|
305
|
-
const v =
|
|
305
|
+
const v = h.bracket.cssvar.global.number(s || "4");
|
|
306
306
|
if (v != null) {
|
|
307
307
|
return {
|
|
308
308
|
"-moz-tab-size": v,
|
|
@@ -313,12 +313,12 @@ const tabSizes = [
|
|
|
313
313
|
}]
|
|
314
314
|
];
|
|
315
315
|
const textIndents = [
|
|
316
|
-
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] ||
|
|
316
|
+
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || h.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }]
|
|
317
317
|
];
|
|
318
318
|
const textStrokes = [
|
|
319
|
-
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] ||
|
|
319
|
+
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || h.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
|
|
320
320
|
[/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
|
|
321
|
-
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity":
|
|
321
|
+
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
|
|
322
322
|
];
|
|
323
323
|
const textShadows = [
|
|
324
324
|
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
@@ -329,10 +329,10 @@ const textShadows = [
|
|
|
329
329
|
"text-shadow": "var(--un-text-shadow)"
|
|
330
330
|
};
|
|
331
331
|
}
|
|
332
|
-
return { "text-shadow":
|
|
332
|
+
return { "text-shadow": h.bracket.cssvar.global(s) };
|
|
333
333
|
}, { autocomplete: "text-shadow-$textShadow" }],
|
|
334
334
|
[/^text-shadow-color-(.+)$/, colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
|
|
335
|
-
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity":
|
|
335
|
+
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
|
|
336
336
|
];
|
|
337
337
|
|
|
338
338
|
const overflowValues = [
|
|
@@ -376,7 +376,7 @@ const justifies = [
|
|
|
376
376
|
...makeGlobalStaticRules("justify-self")
|
|
377
377
|
];
|
|
378
378
|
const orders = [
|
|
379
|
-
[/^order-(.+)$/, ([, v]) => ({ order:
|
|
379
|
+
[/^order-(.+)$/, ([, v]) => ({ order: h.bracket.cssvar.number(v) })],
|
|
380
380
|
["order-first", { order: "-9999" }],
|
|
381
381
|
["order-last", { order: "9999" }],
|
|
382
382
|
["order-none", { order: "0" }]
|
|
@@ -429,7 +429,7 @@ const flexGridJustifiesAlignments = [...justifies, ...alignments].flatMap(([k, v
|
|
|
429
429
|
[`grid-${k}`, v]
|
|
430
430
|
]);
|
|
431
431
|
function handleInsetValue(v, { theme }) {
|
|
432
|
-
return theme.spacing?.[v] ??
|
|
432
|
+
return theme.spacing?.[v] ?? h.bracket.cssvar.global.auto.fraction.rem(v);
|
|
433
433
|
}
|
|
434
434
|
function handleInsetValues([, d, v], ctx) {
|
|
435
435
|
const r = handleInsetValue(v, ctx);
|
|
@@ -468,8 +468,8 @@ const floats = [
|
|
|
468
468
|
...makeGlobalStaticRules("clear")
|
|
469
469
|
];
|
|
470
470
|
const zIndexes = [
|
|
471
|
-
[/^(?:position-|pos-)?z([\d.]+)$/, ([, v]) => ({ "z-index":
|
|
472
|
-
[/^(?:position-|pos-)?z-(.+)$/, ([, v]) => ({ "z-index":
|
|
471
|
+
[/^(?:position-|pos-)?z([\d.]+)$/, ([, v]) => ({ "z-index": h.number(v) })],
|
|
472
|
+
[/^(?:position-|pos-)?z-(.+)$/, ([, v]) => ({ "z-index": h.bracket.cssvar.global.auto.number(v) }), { autocomplete: "z-<num>" }]
|
|
473
473
|
];
|
|
474
474
|
const boxSizing = [
|
|
475
475
|
["box-border", { "box-sizing": "border-box" }],
|
|
@@ -488,7 +488,7 @@ const displays = [
|
|
|
488
488
|
["flow-root", { display: "flow-root" }],
|
|
489
489
|
["list-item", { display: "list-item" }],
|
|
490
490
|
["hidden", { display: "none" }],
|
|
491
|
-
[/^display-(.+)$/, ([, c]) => ({ display:
|
|
491
|
+
[/^display-(.+)$/, ([, c]) => ({ display: h.bracket.cssvar.global(c) || c })]
|
|
492
492
|
];
|
|
493
493
|
const appearances = [
|
|
494
494
|
["visible", { visibility: "visible" }],
|
|
@@ -498,14 +498,14 @@ const appearances = [
|
|
|
498
498
|
...makeGlobalStaticRules("backface", "backface-visibility")
|
|
499
499
|
];
|
|
500
500
|
const cursors = [
|
|
501
|
-
[/^cursor-(.+)$/, ([, c]) => ({ cursor:
|
|
501
|
+
[/^cursor-(.+)$/, ([, c]) => ({ cursor: h.bracket.cssvar.global(c) })],
|
|
502
502
|
...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
|
|
503
503
|
];
|
|
504
504
|
const contains = [
|
|
505
505
|
[/^contain-(.*)$/, ([, d]) => {
|
|
506
|
-
if (
|
|
506
|
+
if (h.bracket(d) != null) {
|
|
507
507
|
return {
|
|
508
|
-
contain:
|
|
508
|
+
contain: h.bracket(d).split(" ").map((e) => h.cssvar.fraction(e) ?? e).join(" ")
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
511
|
return containValues.includes(d) ? { contain: d } : void 0;
|
|
@@ -538,14 +538,14 @@ const whitespaces = [
|
|
|
538
538
|
]
|
|
539
539
|
];
|
|
540
540
|
const contentVisibility = [
|
|
541
|
-
[/^intrinsic-size-(.+)$/, ([, d]) => ({ "contain-intrinsic-size":
|
|
541
|
+
[/^intrinsic-size-(.+)$/, ([, d]) => ({ "contain-intrinsic-size": h.bracket.cssvar.global.fraction.rem(d) }), { autocomplete: "intrinsic-size-<num>" }],
|
|
542
542
|
["content-visibility-visible", { "content-visibility": "visible" }],
|
|
543
543
|
["content-visibility-hidden", { "content-visibility": "hidden" }],
|
|
544
544
|
["content-visibility-auto", { "content-visibility": "auto" }],
|
|
545
545
|
...makeGlobalStaticRules("content-visibility")
|
|
546
546
|
];
|
|
547
547
|
const contents = [
|
|
548
|
-
[/^content-(.+)$/, ([, v]) => ({ content:
|
|
548
|
+
[/^content-(.+)$/, ([, v]) => ({ content: h.bracket.cssvar(v) })],
|
|
549
549
|
["content-empty", { content: '""' }],
|
|
550
550
|
["content-none", { content: "none" }]
|
|
551
551
|
];
|
|
@@ -606,7 +606,7 @@ const ringBase = {
|
|
|
606
606
|
};
|
|
607
607
|
const rings = [
|
|
608
608
|
[/^ring(?:-(.+))?$/, ([, d], { theme }) => {
|
|
609
|
-
const value = theme.ringWidth?.[d || "DEFAULT"] ??
|
|
609
|
+
const value = theme.ringWidth?.[d || "DEFAULT"] ?? h.px(d || "1");
|
|
610
610
|
if (value) {
|
|
611
611
|
return {
|
|
612
612
|
"--un-ring-width": value,
|
|
@@ -616,13 +616,13 @@ const rings = [
|
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
618
|
}, { autocomplete: "ring-$ringWidth" }],
|
|
619
|
-
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ??
|
|
619
|
+
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? h.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
|
|
620
620
|
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
621
|
-
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ??
|
|
621
|
+
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? h.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
|
|
622
622
|
[/^ring-(.+)$/, colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
|
|
623
|
-
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity":
|
|
623
|
+
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
|
|
624
624
|
[/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
|
|
625
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity":
|
|
625
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
|
|
626
626
|
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
627
627
|
];
|
|
628
628
|
|
|
@@ -637,7 +637,7 @@ const boxShadows = [
|
|
|
637
637
|
const [, d] = match;
|
|
638
638
|
const { theme } = context;
|
|
639
639
|
const v = theme.boxShadow?.[d || "DEFAULT"];
|
|
640
|
-
const c = d ?
|
|
640
|
+
const c = d ? h.bracket.cssvar(d) : void 0;
|
|
641
641
|
if ((v != null || c != null) && !hasParseableColor(c, theme)) {
|
|
642
642
|
return {
|
|
643
643
|
"--un-shadow": colorableShadows(v || c, "--un-shadow-color").join(","),
|
|
@@ -646,7 +646,7 @@ const boxShadows = [
|
|
|
646
646
|
}
|
|
647
647
|
return colorResolver("--un-shadow-color", "shadow")(match, context);
|
|
648
648
|
}, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
|
|
649
|
-
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity":
|
|
649
|
+
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
|
|
650
650
|
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
651
651
|
];
|
|
652
652
|
|
|
@@ -696,9 +696,9 @@ const transformBase = {
|
|
|
696
696
|
"--un-translate-z": 0
|
|
697
697
|
};
|
|
698
698
|
const transforms = [
|
|
699
|
-
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": positionMap[s] ??
|
|
699
|
+
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": positionMap[s] ?? h.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(positionMap).join("|")})`, `origin-(${Object.keys(positionMap).join("|")})`] }],
|
|
700
700
|
[/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
|
|
701
|
-
const v =
|
|
701
|
+
const v = h.bracket.cssvar.px.numberWithUnit(s);
|
|
702
702
|
if (v != null) {
|
|
703
703
|
return {
|
|
704
704
|
"-webkit-perspective": v,
|
|
@@ -707,7 +707,7 @@ const transforms = [
|
|
|
707
707
|
}
|
|
708
708
|
}],
|
|
709
709
|
[/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => {
|
|
710
|
-
const v =
|
|
710
|
+
const v = h.bracket.cssvar(s) ?? (s.length >= 3 ? positionMap[s] : void 0);
|
|
711
711
|
if (v != null) {
|
|
712
712
|
return {
|
|
713
713
|
"-webkit-perspective-origin": v,
|
|
@@ -732,7 +732,7 @@ const transforms = [
|
|
|
732
732
|
...makeGlobalStaticRules("transform")
|
|
733
733
|
];
|
|
734
734
|
function handleTranslate([, d, b], { theme }) {
|
|
735
|
-
const v = theme.spacing?.[b] ??
|
|
735
|
+
const v = theme.spacing?.[b] ?? h.bracket.cssvar.fraction.rem(b);
|
|
736
736
|
if (v != null) {
|
|
737
737
|
return [
|
|
738
738
|
...xyzMap[d].map((i) => [`--un-translate${i}`, v]),
|
|
@@ -741,7 +741,7 @@ function handleTranslate([, d, b], { theme }) {
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
function handleScale([, d, b]) {
|
|
744
|
-
const v =
|
|
744
|
+
const v = h.bracket.cssvar.fraction.percent(b);
|
|
745
745
|
if (v != null) {
|
|
746
746
|
return [
|
|
747
747
|
...xyzMap[d].map((i) => [`--un-scale${i}`, v]),
|
|
@@ -750,7 +750,7 @@ function handleScale([, d, b]) {
|
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
function handleRotate([, d = "", b]) {
|
|
753
|
-
const v =
|
|
753
|
+
const v = h.bracket.cssvar.degree(b);
|
|
754
754
|
if (v != null) {
|
|
755
755
|
if (d) {
|
|
756
756
|
return {
|
|
@@ -770,7 +770,7 @@ function handleRotate([, d = "", b]) {
|
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
function handleSkew([, d, b]) {
|
|
773
|
-
const v =
|
|
773
|
+
const v = h.bracket.cssvar.degree(b);
|
|
774
774
|
if (v != null) {
|
|
775
775
|
return [
|
|
776
776
|
...xyzMap[d].map((i) => [`--un-skew${i}`, v]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as colors } from './preset-mini.1c66bf79.mjs';
|
|
2
|
-
import { U as transformBase, V as boxShadowsBase, W as ringBase } from './preset-mini.
|
|
2
|
+
import { U as transformBase, V as boxShadowsBase, W as ringBase } from './preset-mini.a201ed79.mjs';
|
|
3
3
|
import '@unocss/core';
|
|
4
|
-
import './preset-mini.
|
|
4
|
+
import './preset-mini.08cdeeea.mjs';
|
|
5
5
|
|
|
6
6
|
const fontFamily = {
|
|
7
7
|
sans: [
|