@unocss/preset-mini 0.20.4 → 0.22.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.
@@ -1,6 +1,5 @@
1
1
  import { h as handler, c as colorResolver, d as directionMap, p as parseColor, a as cornerMap, b as capitalize, e as directionSize, f as positionMap, x as xyzMap } from './utilities.mjs';
2
- import { toArray } from '@unocss/core';
3
- import { C as CONTROL_BYPASS_PSEUDO_CLASS } from './pseudo.mjs';
2
+ import { toArray, CONTROL_SHORTCUT_NO_MERGE } from '@unocss/core';
4
3
 
5
4
  const verticalAlignAlias = {
6
5
  mid: "middle",
@@ -8,7 +7,7 @@ const verticalAlignAlias = {
8
7
  btm: "bottom"
9
8
  };
10
9
  const verticalAligns = [
11
- [/^(?:vertical|align|v)-(baseline|top|bottom|middle|text-top|text-bottom|mid|base|btm)$/, ([, v]) => ({ "vertical-align": verticalAlignAlias[v] || v })]
10
+ [/^(?:vertical|align|v)-(baseline|top|middle|bottom|text-top|text-bottom|sub|super|mid|base|btm)$/, ([, v]) => ({ "vertical-align": verticalAlignAlias[v] || v })]
12
11
  ];
13
12
  const textAligns = [
14
13
  ["text-center", { "text-align": "center" }],
@@ -22,7 +21,7 @@ const outline = [
22
21
  [/^outline-(?:color-)?(.+)$/, colorResolver("outline-color", "outline-color")],
23
22
  [/^outline-offset-(.+)$/, ([, d]) => ({ "outline-offset": handler.bracket.fraction.auto.rem(d) })],
24
23
  ["outline", { "outline-style": "solid" }],
25
- [/^outline-(auto|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|revert|unset)$/, ([, c]) => ({ "outline-style": c })],
24
+ [/^outline-(auto|dashed|dotted|double|hidden|solid|groove|ridge|inset|outset|inherit|initial|revert|unset)$/, ([, c]) => ({ "outline-style": c })],
26
25
  ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
27
26
  ];
28
27
  const appearance = [
@@ -31,8 +30,14 @@ const appearance = [
31
30
  "-webkit-appearance": "none"
32
31
  }]
33
32
  ];
33
+ const willChangeProperty = (prop) => {
34
+ return handler.properties.auto.global(prop) ?? {
35
+ contents: "contents",
36
+ scroll: "scroll-position"
37
+ }[prop];
38
+ };
34
39
  const willChange = [
35
- [/^will-change-(.+)/, ([, p]) => ({ "will-change": handler.properties.global(p) })]
40
+ [/^will-change-(.+)/, ([, p]) => ({ "will-change": willChangeProperty(p) })]
36
41
  ];
37
42
 
38
43
  const borders = [
@@ -180,10 +185,10 @@ const flex = [
180
185
  ["flex-initial", { flex: "0 1 auto" }],
181
186
  ["flex-none", { flex: "none" }],
182
187
  [/^flex-(\[.+\])$/, ([, d]) => ({ flex: handler.bracket(d).replace(/\d+\/\d+/, ($1) => handler.fraction($1)) })],
183
- ["flex-shrink", { "flex-shrink": 1 }],
184
- ["flex-shrink-0", { "flex-shrink": 0 }],
185
- ["flex-grow", { "flex-grow": 1 }],
186
- ["flex-grow-0", { "flex-grow": 0 }],
188
+ [/^(?:flex-)?shrink$/, () => ({ "flex-shrink": 1 })],
189
+ [/^(?:flex-)?shrink-0$/, () => ({ "flex-shrink": 0 })],
190
+ [/^(?:flex-)?grow$/, () => ({ "flex-grow": 1 })],
191
+ [/^(?:flex-)?grow-0$/, () => ({ "flex-grow": 0 })],
187
192
  [/^(?:flex-)?basis-(.+)$/, ([, d]) => ({ "flex-basis": handler.bracket.fraction.auto.rem(d) })],
188
193
  ["flex-row", { "flex-direction": "row" }],
189
194
  ["flex-row-reverse", { "flex-direction": "row-reverse" }],
@@ -208,17 +213,15 @@ const weightMap = {
208
213
  const fonts = [
209
214
  [/^font-(\w+)$/, ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] })],
210
215
  [/^text-(.+)$/, ([, s = "base"], { theme }) => {
211
- const size = handler.bracket.auto.rem(s);
212
- if (size)
213
- return { "font-size": size };
214
216
  const themed = toArray(theme.fontSize?.[s]);
215
217
  if (themed?.[0]) {
216
- const [size2, height] = themed;
218
+ const [size, height = "1"] = themed;
217
219
  return {
218
- "font-size": size2,
220
+ "font-size": size,
219
221
  "line-height": height
220
222
  };
221
223
  }
224
+ return { "font-size": handler.bracket.auto.rem(s) };
222
225
  }],
223
226
  [/^text-size-(.+)$/, ([, s]) => ({ "font-size": handler.bracket.auto.rem(s) })],
224
227
  [/^(?:font|fw)-?([^-]+)$/, ([, s]) => ({ "font-weight": weightMap[s] || handler.number(s) })],
@@ -227,7 +230,7 @@ const fonts = [
227
230
  [/^word-spacing-([^-]+)$/, ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || handler.bracket.auto.rem(s) })]
228
231
  ];
229
232
  const tabSizes = [
230
- [/^tab-?([^-]*)$/, ([, s]) => {
233
+ [/^tab(?:-([^-]+))?$/, ([, s]) => {
231
234
  const v = handler.bracket.global.number(s || "4");
232
235
  if (v != null) {
233
236
  return {
@@ -269,53 +272,47 @@ const gaps = [
269
272
  [/^(?:flex-|grid-)?gap-([xy])-([^-]+)$/, handleGap]
270
273
  ];
271
274
 
272
- const calSize = (s, theme) => toArray(theme.fontSize?.[s] || handler.bracket.auto.rem(s))[0];
275
+ const rowCol = (s) => s.replace("col", "column");
273
276
  const autoDirection = (selector, theme) => {
274
- if (selector === "min")
275
- return "min-content";
276
- else if (selector === "max")
277
- return "max-content";
278
- else if (selector === "fr")
279
- return "minmax(0,1fr)";
280
- return calSize(selector, theme);
277
+ const v = theme.fontSize?.[selector];
278
+ if (v != null)
279
+ return toArray(v)[0];
280
+ switch (selector) {
281
+ case "min":
282
+ return "min-content";
283
+ case "max":
284
+ return "max-content";
285
+ case "fr":
286
+ return "minmax(0,1fr)";
287
+ }
288
+ return handler.bracket.auto.rem(selector);
281
289
  };
282
290
  const grids = [
283
291
  ["grid", { display: "grid" }],
284
292
  ["inline-grid", { display: "inline-grid" }],
285
- [/^(?:grid-)?col-start-([\w.-]+)$/, ([, v]) => ({ "grid-column-start": v })],
286
- [/^(?:grid-)?col-end-([\w.]+)$/, ([, v]) => ({ "grid-column-end": v })],
287
- [/^(?:grid-)?row-start-([\w.-]+)$/, ([, v]) => ({ "grid-row-start": v })],
288
- [/^(?:grid-)?row-end-([\w.-]+)$/, ([, v]) => ({ "grid-row-end": v })],
289
- [/^(?:grid-)?(row|col)-(.+)$/, ([, d, v]) => {
290
- const key = d === "row" ? "grid-row" : "grid-column";
291
- let raw = handler.bracket(v);
292
- if (raw)
293
- return { [key]: raw };
294
- const parts = v.split("-");
295
- if (parts.length === 1 && parts[0] === "auto")
296
- return { [key]: parts[0] };
297
- if (parts[0] === "span") {
298
- if (parts[1] === "full")
299
- return { [key]: "1/-1" };
300
- raw = handler.number.bracket(parts[1]);
301
- if (raw)
302
- return { [key]: `span ${raw}/span ${raw}` };
303
- }
293
+ [/^(?:grid-)?(row|col)-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}`]: handler.bracket.auto(v) })],
294
+ [/^(?:grid-)?(row|col)-span-(.+)$/, ([, c, s]) => {
295
+ if (s === "full")
296
+ return { [`grid-${rowCol(c)}`]: "1/-1" };
297
+ const v = handler.bracket.number(s);
298
+ if (v != null)
299
+ return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
304
300
  }],
305
- [/^(?:grid-)?auto-cols-([\w.-]+)$/, ([, v], { theme }) => ({ "grid-auto-columns": autoDirection(v, theme) })],
306
- [/^(?:grid-)?auto-flow-([\w.-]+)$/, ([, v]) => ({ "grid-auto-flow": v.replace("col", "column").split("-").join(" ") })],
307
- [/^(?:grid-)?auto-rows-([\w.-]+)$/, ([, v], { theme }) => ({ "grid-auto-rows": autoDirection(v, theme) })],
308
- [/^grid-cols-(.+)$/, ([, v]) => ({ "grid-template-columns": handler.bracket(v) })],
309
- [/^grid-rows-(.+)$/, ([, v]) => ({ "grid-template-rows": handler.bracket(v) })],
310
- [/^grid-cols-minmax-([\w.-]+)$/, ([, d]) => ({ "grid-template-columns": `repeat(auto-fill,minmax(${d},1fr))` })],
311
- [/^grid-rows-minmax-([\w.-]+)$/, ([, d]) => ({ "grid-template-rows": `repeat(auto-fill,minmax(${d},1fr))` })],
312
- [/^grid-cols-(\d+)$/, ([, d]) => ({ "grid-template-columns": `repeat(${d},minmax(0,1fr))` })],
313
- [/^grid-rows-(\d+)$/, ([, d]) => ({ "grid-template-rows": `repeat(${d},minmax(0,1fr))` })]
301
+ [/^(?:grid-)?(row|col)-start-([\w.-]+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: v })],
302
+ [/^(?:grid-)?(row|col)-end-([\w.-]+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: v })],
303
+ [/^(?:grid-)?auto-(rows|cols)-([\w.-]+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(v, theme) })],
304
+ [/^(?:grid-auto-flow|auto-flow|grid-flow)-((?:row|col)(?:-dense)?)$/, ([, v]) => ({ "grid-auto-flow": rowCol(v).replace("-", " ") })],
305
+ [/^grid-(rows|cols)-(\[.+\])$/, ([, c, v]) => ({ [`grid-template-${rowCol(c)}`]: handler.bracket(v) })],
306
+ [/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
307
+ [/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` })],
308
+ ["grid-rows-none", { "grid-template-rows": "none" }],
309
+ ["grid-cols-none", { "grid-template-columns": "none" }]
314
310
  ];
315
311
 
316
312
  const overflowValues = [
317
313
  "auto",
318
314
  "hidden",
315
+ "clip",
319
316
  "visible",
320
317
  "scroll"
321
318
  ];
@@ -397,7 +394,7 @@ function handleInsetValues([, d, v]) {
397
394
  return directionMap[d].map((i) => [i.slice(1), r]);
398
395
  }
399
396
  const insets = [
400
- [/^(?:position-|pos-)?inset-()(.+)$/, handleInsetValues],
397
+ [/^(?:position-|pos-)?inset-(.+)$/, ([, v]) => ({ inset: handleInsetValue(v) })],
401
398
  [/^(?:position-|pos-)?inset-([xy])-(.+)$/, handleInsetValues],
402
399
  [/^(?:position-|pos-)?(top|left|right|bottom)-(.+)$/, ([, d, v]) => ({ [d]: handleInsetValue(v) })]
403
400
  ];
@@ -458,11 +455,12 @@ const whitespaces = [
458
455
  [/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v })]
459
456
  ];
460
457
  const contents = [
461
- ["content-empty", { content: '""' }]
458
+ ["content-empty", { content: '""' }],
459
+ ["content-none", { content: '""' }]
462
460
  ];
463
461
  const breaks = [
464
462
  ["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
465
- ["break-word", { "overflow-wrap": "break-word" }],
463
+ ["break-words", { "overflow-wrap": "break-word" }],
466
464
  ["break-all", { "word-break": "break-all" }]
467
465
  ];
468
466
  const textOverflows = [
@@ -494,14 +492,14 @@ const fontSmoothings = [
494
492
  ];
495
493
 
496
494
  const rings = [
497
- [/^ring-?(.*)$/, ([, d]) => {
495
+ [/^ring(?:-(.+))?$/, ([, d]) => {
498
496
  const value = handler.px(d || "1");
499
497
  if (value) {
500
498
  return {
501
499
  "--un-ring-inset": varEmpty,
502
500
  "--un-ring-offset-width": "0px",
503
501
  "--un-ring-offset-color": "#fff",
504
- "--un-ring-color": "rgba(59, 130, 246, .5)",
502
+ "--un-ring-color": "rgba(147, 197, 253, .5)",
505
503
  "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
506
504
  "--un-ring-shadow": `var(--un-ring-inset) 0 0 0 calc(${value} + var(--un-ring-offset-width)) var(--un-ring-color)`,
507
505
  "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)"
@@ -535,7 +533,7 @@ const shadowColorResolver = (body, theme) => {
535
533
  }
536
534
  };
537
535
  const boxShadows = [
538
- [/^shadow-?(.*)$/, ([, d], { theme }) => {
536
+ [/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
539
537
  const value = theme.boxShadow?.[d || "DEFAULT"];
540
538
  if (value) {
541
539
  return {
@@ -553,37 +551,38 @@ const boxShadows = [
553
551
  function getPropName(minmax, hw) {
554
552
  return `${minmax ? `${minmax}-` : ""}${hw === "h" ? "height" : "width"}`;
555
553
  }
556
- function getThemeValue(minmax, hw, theme, prop) {
554
+ function getSizeValue(minmax, hw, theme, prop) {
557
555
  let str = `${hw === "h" ? "height" : "width"}`;
558
556
  if (minmax)
559
557
  str = `${minmax}${capitalize(str)}`;
560
- return theme[str]?.[prop];
558
+ const v = theme[str]?.[prop];
559
+ if (v != null)
560
+ return v;
561
+ switch (prop) {
562
+ case "fit":
563
+ case "max":
564
+ case "min":
565
+ return `${prop}-content`;
566
+ }
567
+ return handler.bracket.cssvar.fraction.auto.rem(prop);
561
568
  }
562
569
  const sizes = [
563
- [/^(?:(min|max)-)?(w|h)-(.+)$/, ([, m, w, s], { theme }) => {
564
- const v = getThemeValue(m, w, theme, s) || handler.bracket.cssvar.fraction.auto.rem(s);
565
- if (v != null)
566
- return { [getPropName(m, w)]: v };
567
- }],
568
- [/^(?:(min|max)-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => {
569
- const v = theme.breakpoints?.[s];
570
- if (v != null)
571
- return { [getPropName(m, w)]: v };
572
- }]
573
- ];
570
+ [/^(?:(min|max)-)?(w|h)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
571
+ [/^(?:(min|max)-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: theme.breakpoints?.[s] })]
572
+ ];
573
+ function getAspectRatio(prop) {
574
+ if (/^\d+\/\d+$/.test(prop))
575
+ return prop;
576
+ switch (prop) {
577
+ case "square":
578
+ return "1/1";
579
+ case "video":
580
+ return "16/9";
581
+ }
582
+ return handler.bracket.cssvar.auto.number(prop);
583
+ }
574
584
  const aspectRatio = [
575
- [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => {
576
- if (/^\d+\/\d+$/.test(d))
577
- return { "aspect-ratio": d };
578
- const v = {
579
- auto: "auto",
580
- square: "1/1",
581
- video: "16/9"
582
- }[d];
583
- if (v != null)
584
- return { "aspect-ratio": v };
585
- return { "aspect-ratio": handler.bracket.cssvar.number(d) };
586
- }]
585
+ [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) })]
587
586
  ];
588
587
 
589
588
  const paddings = [
@@ -598,12 +597,10 @@ const margins = [
598
597
  ];
599
598
 
600
599
  const transformGpu = {
601
- transform: "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
602
- [CONTROL_BYPASS_PSEUDO_CLASS]: ""
600
+ "--un-transform": "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))"
603
601
  };
604
602
  const transformCpu = {
605
- transform: "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z))",
606
- [CONTROL_BYPASS_PSEUDO_CLASS]: ""
603
+ "--un-transform": "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z))"
607
604
  };
608
605
  const transformBase = {
609
606
  "--un-rotate": 0,
@@ -615,30 +612,55 @@ const transformBase = {
615
612
  "--un-translate-x": 0,
616
613
  "--un-translate-y": 0,
617
614
  "--un-translate-z": 0,
618
- ...transformCpu
615
+ ...transformCpu,
616
+ [CONTROL_SHORTCUT_NO_MERGE]: ""
619
617
  };
620
618
  const transforms = [
621
- ["transform", transformBase],
622
- [/^preserve-(3d|flat)$/, ([, value]) => ({ "transform-style": value === "3d" ? `preserve-${value}` : value })],
623
- [/^translate()-(.+)$/, handleTranslate],
619
+ [/^origin-([-\w]{3,})$/, ([, s]) => ({ "transform-origin": positionMap[s] })],
620
+ [/^perspect-(.+)$/, ([, s]) => {
621
+ const v = handler.px.numberWithUnit(s);
622
+ if (v != null) {
623
+ return {
624
+ "-webkit-perspective": v,
625
+ "perspective": v
626
+ };
627
+ }
628
+ }],
629
+ [/^perspect-origin-(.+)$/, ([, s]) => {
630
+ const v = handler.bracket(s) ?? (s.length >= 3 ? positionMap[s] : void 0);
631
+ if (v != null) {
632
+ return {
633
+ "-webkit-perspective-origin": v,
634
+ "perspective-origin": v
635
+ };
636
+ }
637
+ }],
638
+ [/^translate-()(.+)$/, handleTranslate],
624
639
  [/^translate-([xyz])-(.+)$/, handleTranslate],
625
- [/^scale()-(.+)$/, handleScale],
626
- [/^scale-([xyz])-(.+)$/, handleScale],
627
640
  [/^rotate-(.+)$/, handleRotate],
628
- [/^rotate-((?!\[)[^-]+?)(?:deg)?$/, handleRotateWithUnit],
641
+ [/^skew-()(.+)$/, handleSkew],
629
642
  [/^skew-([xy])-(.+)$/, handleSkew],
630
- [/^skew-([xy])-((?!\[)[^-]+?)(?:deg)?$/, handleSkewWithUnit],
643
+ [/^scale-()(.+)$/, handleScale],
644
+ [/^scale-([xyz])-(.+)$/, handleScale],
645
+ ["preserve-3d", { "transform-style": "preserve-3d" }],
646
+ ["preserve-flat", { "transform-style": "flat" }],
647
+ [/^transform$/, () => [
648
+ transformBase,
649
+ { transform: "var(--un-transform)" }
650
+ ]],
631
651
  ["transform-gpu", transformGpu],
632
652
  ["transform-cpu", transformCpu],
633
- ["transform-none", { transform: "none" }],
634
- [/^origin-([-\w]{3,})$/, ([, s]) => ({ "transform-origin": positionMap[s] })]
653
+ ["transform-none", { transform: "none" }]
635
654
  ];
636
655
  function handleTranslate([, d, b]) {
637
656
  const v = handler.bracket.fraction.auto.rem(b);
638
657
  if (v != null) {
639
658
  return [
640
659
  transformBase,
641
- xyzMap[d].map((i) => [`--un-translate${i}`, v])
660
+ [
661
+ ...xyzMap[d].map((i) => [`--un-translate${i}`, v]),
662
+ ["transform", "var(--un-transform)"]
663
+ ]
642
664
  ];
643
665
  }
644
666
  }
@@ -647,43 +669,34 @@ function handleScale([, d, b]) {
647
669
  if (v != null) {
648
670
  return [
649
671
  transformBase,
650
- xyzMap[d].map((i) => [`--un-scale${i}`, v])
651
- ];
652
- }
653
- }
654
- function handleRotateWithUnit([, b]) {
655
- const v = handler.bracket.number(b);
656
- if (v != null) {
657
- return [
658
- transformBase,
659
- { "--un-rotate": `${v}deg` }
672
+ [
673
+ ...xyzMap[d].map((i) => [`--un-scale${i}`, v]),
674
+ ["transform", "var(--un-transform)"]
675
+ ]
660
676
  ];
661
677
  }
662
678
  }
663
679
  function handleRotate([, b]) {
664
- const v = handler.bracket(b);
665
- if (v != null) {
666
- return [
667
- transformBase,
668
- { "--un-rotate": v }
669
- ];
670
- }
671
- }
672
- function handleSkewWithUnit([, d, b]) {
673
- const v = handler.bracket.number(b);
680
+ const v = handler.bracket.degree(b);
674
681
  if (v != null) {
675
682
  return [
676
683
  transformBase,
677
- { [`--un-skew-${d}`]: `${v}deg` }
684
+ {
685
+ "--un-rotate": v,
686
+ "transform": "var(--un-transform)"
687
+ }
678
688
  ];
679
689
  }
680
690
  }
681
691
  function handleSkew([, d, b]) {
682
- const v = handler.bracket(b);
692
+ const v = handler.bracket.degree(b);
683
693
  if (v != null) {
684
694
  return [
685
695
  transformBase,
686
- { [`--un-skew-${d}`]: v }
696
+ {
697
+ [`--un-skew-${d}`]: v,
698
+ transform: "var(--un-transform)"
699
+ }
687
700
  ];
688
701
  }
689
702
  }
@@ -732,10 +745,11 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
732
745
  ];
733
746
 
734
747
  const textDecorations = [
735
- ["underline", { "text-decoration": "underline" }],
736
- ["line-through", { "text-decoration": "line-through" }],
737
- ["decoration-underline", { "text-decoration": "underline" }],
738
- ["decoration-line-through", { "text-decoration": "line-through" }],
748
+ ["underline", { "text-decoration-line": "underline" }],
749
+ ["overline", { "text-decoration-line": "overline" }],
750
+ ["line-through", { "text-decoration-line": "line-through" }],
751
+ ["decoration-underline", { "text-decoration-line": "underline" }],
752
+ ["decoration-line-through", { "text-decoration-line": "line-through" }],
739
753
  [/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s]) => ({ "text-decoration-thickness": handler.bracket.px(s) })],
740
754
  [/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s })],
741
755
  [/^(?:underline|decoration)-(.+)$/, (match, ctx) => {
@@ -759,8 +773,18 @@ const svgUtilities = [
759
773
  [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": handler.bracket.percent(opacity) })],
760
774
  ["fill-none", { fill: "none" }],
761
775
  [/^stroke-(?:size-|width-)?(.+)$/, ([, s]) => ({ "stroke-width": handler.bracket.fraction.px.number(s) })],
776
+ [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": handler.bracket.number(s) })],
777
+ [/^stroke-offset-(.+)$/, ([, s]) => ({ "stroke-dashoffset": handler.bracket.px.numberWithUnit(s) })],
762
778
  [/^stroke-(.+)$/, colorResolver("stroke", "stroke")],
763
779
  [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": handler.bracket.percent(opacity) })],
780
+ ["stroke-cap-square", { "stroke-linecap": "square" }],
781
+ ["stroke-cap-round", { "stroke-linecap": "round" }],
782
+ ["stroke-cap-auto", { "stroke-linecap": "butt" }],
783
+ ["stroke-join-arcs", { "stroke-linejoin": "arcs" }],
784
+ ["stroke-join-bevel", { "stroke-linejoin": "bevel" }],
785
+ ["stroke-join-clip", { "stroke-linejoin": "miter-clip" }],
786
+ ["stroke-join-round", { "stroke-linejoin": "round" }],
787
+ ["stroke-join-auto", { "stroke-linejoin": "miter" }],
764
788
  ["stroke-none", { stroke: "none" }]
765
789
  ];
766
790