@unocss/preset-mini 0.17.2 → 0.19.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.
@@ -19,38 +19,12 @@ const textAligns = [
19
19
  ["text-justify", { "text-align": "justify" }]
20
20
  ];
21
21
 
22
- const outlineStyle = ["auto", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"];
23
- const parseOutlineSize = (s) => {
24
- const propName = ["width", "offset"].find((item) => s.startsWith(item)) || "width";
25
- const size = utilities.handler.bracket.fraction.auto.rem(s.replace(/^(offset\-|width\-|size\-)/, ""));
26
- if (size) {
27
- return {
28
- [`outline-${propName}`]: size
29
- };
30
- }
31
- };
32
22
  const outline = [
23
+ [/^outline-(?:width-|size-)?(.+)$/, ([, d]) => ({ "outline-width": utilities.handler.bracket.fraction.auto.rem(d) })],
24
+ [/^outline-(?:color-)?(.+)$/, utilities.colorResolver("outline-color", "outline-color")],
25
+ [/^outline-offset-(.+)$/, ([, d]) => ({ "outline-offset": utilities.handler.bracket.fraction.auto.rem(d) })],
33
26
  ["outline", { "outline-style": "solid" }],
34
- [
35
- /^outline-(.+)$/,
36
- (match, config) => {
37
- const [, d] = match;
38
- if (outlineStyle.includes(d)) {
39
- return {
40
- "outline-style": d
41
- };
42
- }
43
- const colorSheet = utilities.colorResolver("outline-color", "outline-color")([
44
- match[0],
45
- match[1].replace(/^color-/, "")
46
- ], config);
47
- if (colorSheet)
48
- return colorSheet;
49
- const sizeSheet = parseOutlineSize(d);
50
- if (sizeSheet)
51
- return sizeSheet;
52
- }
53
- ],
27
+ [/^outline-(auto|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|revert|unset)$/, ([, c]) => ({ "outline-style": c })],
54
28
  ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
55
29
  ];
56
30
  const appearance = [
@@ -59,21 +33,6 @@ const appearance = [
59
33
  "-webkit-appearance": "none"
60
34
  }]
61
35
  ];
62
- const placeholder = [
63
- [
64
- /^placeholder-opacity-(\d+)$/,
65
- ([, d]) => ({
66
- "placeholder-opacity": utilities.handler.bracket.percent(d)
67
- })
68
- ],
69
- [
70
- /^placeholder-(?!opacity)(.+)$/,
71
- (match, config) => {
72
- match[1] = match[1].replace(/^color-/, "");
73
- return utilities.colorResolver("placeholder-color", "placeholder-color")(match, config);
74
- }
75
- ]
76
- ];
77
36
  const willChange = [
78
37
  [/^will-change-(.+)/, ([, p]) => ({ "will-change": utilities.handler.properties.global(p) })]
79
38
  ];
@@ -86,16 +45,59 @@ const borders = [
86
45
  [/^(?:border|b)-([^-]+)-size-(.+)$/, handlerBorderSize],
87
46
  [/^(?:border|b)()-(.+)$/, handlerBorderColor],
88
47
  [/^(?:border|b)-([^-]+)(?:-(.+))?$/, handlerBorderColor],
89
- [/^(?:border|b)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-border-opacity": utilities.handler.bracket.percent(opacity) })],
48
+ [/^(?:border|b)-op(?:acity)?-?(.+)$/, ([, opacity], { options: { variablePrefix: p } }) => ({ [`--${p}border-opacity`]: utilities.handler.bracket.percent(opacity) })],
49
+ [/^(?:border|b)-([^-]+)-op(?:acity)?-?(.+)$/, ([, a, opacity], { options: { variablePrefix: p } }) => {
50
+ const v = utilities.handler.bracket.percent(opacity);
51
+ const d = utilities.directionMap[a];
52
+ if (v !== void 0 && d)
53
+ return d.map((i) => [`--${p}border${i}-opacity`, v]);
54
+ }],
55
+ [/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
56
+ [/^(?:border-)?(?:rounded|rd)(?:-(.+))?$/, handlerRounded],
57
+ [/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-(.+))?$/, handlerRounded],
90
58
  ["border-solid", { "border-style": "solid" }],
91
59
  ["border-dashed", { "border-style": "dashed" }],
92
60
  ["border-dotted", { "border-style": "dotted" }],
93
61
  ["border-double", { "border-style": "double" }],
94
- ["border-none", { "border-style": "none" }],
95
- [/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
96
- [/^(?:border-)?(?:rounded|rd)(?:-(.+))?$/, handlerRounded],
97
- [/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-(.+))?$/, handlerRounded]
62
+ ["border-none", { "border-style": "none" }]
98
63
  ];
64
+ const borderHasColor = (color, { theme }) => {
65
+ return color !== void 0 && !!utilities.parseColor(color, theme)?.color;
66
+ };
67
+ const borderColorResolver = (direction) => ([, body], { theme, options: { variablePrefix: p } }) => {
68
+ const data = utilities.parseColor(body, theme);
69
+ if (!data)
70
+ return;
71
+ const { opacity, color, rgba } = data;
72
+ if (!color)
73
+ return;
74
+ const a = opacity ? opacity[0] === "[" ? utilities.handler.bracket.percent(opacity) : parseFloat(opacity) / 100 : rgba?.[3];
75
+ if (rgba) {
76
+ if (a != null && !Number.isNaN(a)) {
77
+ rgba[3] = typeof a === "string" && !a.includes("%") ? parseFloat(a) : a;
78
+ return {
79
+ [`border${direction}-color`]: `rgba(${rgba.join(",")})`
80
+ };
81
+ } else {
82
+ if (direction === "") {
83
+ return {
84
+ [`--${p}border-opacity`]: 1,
85
+ [`border${direction}-color`]: `rgba(${rgba.slice(0, 3).join(",")},var(--${p}border${direction}-opacity))`
86
+ };
87
+ } else {
88
+ return {
89
+ [`--${p}border-opacity`]: 1,
90
+ [`--${p}border${direction}-opacity`]: `var(--${p}border-opacity)`,
91
+ [`border${direction}-color`]: `rgba(${rgba.slice(0, 3).join(",")},var(--${p}border${direction}-opacity))`
92
+ };
93
+ }
94
+ }
95
+ } else {
96
+ return {
97
+ [`border${direction}-color`]: color.replace("%alpha", `${a || 1}`)
98
+ };
99
+ }
100
+ };
99
101
  function handlerBorder(m) {
100
102
  const borderSizes = handlerBorderSize(m);
101
103
  if (borderSizes) {
@@ -112,8 +114,8 @@ function handlerBorderSize([, a, b]) {
112
114
  return utilities.directionMap[d].map((i) => [`border${i}-width`, v]);
113
115
  }
114
116
  function handlerBorderColor([, a, c], ctx) {
115
- if (c !== void 0 && utilities.colorResolver("border-color", "border")(["", c], ctx)) {
116
- return Object.assign({}, ...utilities.directionMap[utilities.directionMap[a] ? a : ""].map((i) => utilities.colorResolver(`border${i}-color`, "border")(["", c], ctx)));
117
+ if (borderHasColor(c, ctx)) {
118
+ return Object.assign({}, ...utilities.directionMap[utilities.directionMap[a] ? a : ""].map((i) => borderColorResolver(i)(["", c], ctx)));
117
119
  }
118
120
  }
119
121
  function handlerRounded([, a, b], { theme }) {
@@ -134,18 +136,6 @@ const bgColors = [
134
136
  [/^bg-(.+)$/, utilities.colorResolver("background-color", "bg")],
135
137
  [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": utilities.handler.bracket.percent(opacity2) })]
136
138
  ];
137
- const borderColors = [
138
- [/^(?:border|b)-(.+)$/, utilities.colorResolver("border-color", "border")],
139
- [/^(?:border|b)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-border-opacity": utilities.handler.bracket.percent(opacity2) })]
140
- ];
141
- const ringColors = [
142
- [/^ring-(.+)$/, utilities.colorResolver("--un-ring-color", "ring")],
143
- [/^ring-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-opacity": utilities.handler.bracket.percent(opacity2) })]
144
- ];
145
- const ringOffsetColors = [
146
- [/^ring-offset-(.+)$/, utilities.colorResolver("--un-ring-offset-color", "ring-offset")],
147
- [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-offset-opacity": utilities.handler.bracket.percent(opacity2) })]
148
- ];
149
139
 
150
140
  const transitionProperty = (prop) => {
151
141
  return utilities.handler.properties(prop) || (prop === "all" ? prop : void 0);
@@ -183,7 +173,7 @@ const flex = [
183
173
  ["flex-auto", { flex: "1 1 auto" }],
184
174
  ["flex-initial", { flex: "0 1 auto" }],
185
175
  ["flex-none", { flex: "none" }],
186
- [/^flex-\[(.+)\]$/, ([, d]) => ({ flex: d })],
176
+ [/^flex-(\[.+\])$/, ([, d]) => ({ flex: utilities.handler.bracket(d).replace(/\d+\/\d+/, ($1) => utilities.handler.fraction($1)) })],
187
177
  ["flex-shrink", { "flex-shrink": 1 }],
188
178
  ["flex-shrink-0", { "flex-shrink": 0 }],
189
179
  ["flex-grow", { "flex-grow": 1 }],
@@ -294,30 +284,17 @@ const textShadows = [
294
284
  ];
295
285
 
296
286
  const gaps = [
297
- [/^(?:flex-|grid-)?gap-([^-]+)$/, ([, s]) => {
298
- const v = utilities.handler.bracket.auto.rem(s);
299
- if (v != null) {
300
- return {
301
- "grid-gap": v,
302
- "gap": v
303
- };
304
- }
305
- }],
306
- [/^(?:flex-|grid-)?gap-x-([^-]+)$/, ([, s]) => {
287
+ [/^(?:flex-|grid-)?gap-(x-|y-)?([^-]+)$/, ([, d = "", s]) => {
307
288
  const v = utilities.handler.bracket.auto.rem(s);
308
289
  if (v != null) {
290
+ const direction = {
291
+ "": "",
292
+ "x-": "column-",
293
+ "y-": "row-"
294
+ }[d];
309
295
  return {
310
- "grid-column-gap": v,
311
- "column-gap": v
312
- };
313
- }
314
- }],
315
- [/^(?:flex-|grid-)?gap-y-([^-]+)$/, ([, s]) => {
316
- const v = utilities.handler.bracket.auto.rem(s);
317
- if (v != null) {
318
- return {
319
- "grid-row-gap": v,
320
- "row-gap": v
296
+ [`grid-${direction}gap`]: v,
297
+ [`${direction}gap`]: v
321
298
  };
322
299
  }
323
300
  }]
@@ -351,7 +328,7 @@ const grids = [
351
328
  if (parts[0] === "span") {
352
329
  if (parts[1] === "full")
353
330
  return { [key]: "1/-1" };
354
- raw = utilities.handler.number.bracket(parts[1])?.toString().replace(/_/g, " ");
331
+ raw = utilities.handler.number.bracket(parts[1]);
355
332
  if (raw)
356
333
  return { [key]: `span ${raw}/span ${raw}` };
357
334
  }
@@ -359,12 +336,12 @@ const grids = [
359
336
  [/^(?:grid-)?auto-cols-([\w.-]+)$/, ([, v], { theme }) => ({ "grid-auto-columns": autoDirection(v, theme) })],
360
337
  [/^(?:grid-)?auto-flow-([\w.-]+)$/, ([, v]) => ({ "grid-auto-flow": v.replace("col", "column").split("-").join(" ") })],
361
338
  [/^(?:grid-)?auto-rows-([\w.-]+)$/, ([, v], { theme }) => ({ "grid-auto-rows": autoDirection(v, theme) })],
339
+ [/^grid-cols-(.+)$/, ([, v]) => ({ "grid-template-columns": utilities.handler.bracket(v) })],
340
+ [/^grid-rows-(.+)$/, ([, v]) => ({ "grid-template-rows": utilities.handler.bracket(v) })],
362
341
  [/^grid-cols-minmax-([\w.-]+)$/, ([, d]) => ({ "grid-template-columns": `repeat(auto-fill,minmax(${d},1fr))` })],
363
342
  [/^grid-rows-minmax-([\w.-]+)$/, ([, d]) => ({ "grid-template-rows": `repeat(auto-fill,minmax(${d},1fr))` })],
364
343
  [/^grid-cols-(\d+)$/, ([, d]) => ({ "grid-template-columns": `repeat(${d},minmax(0,1fr))` })],
365
- [/^grid-rows-(\d+)$/, ([, d]) => ({ "grid-template-rows": `repeat(${d},minmax(0,1fr))` })],
366
- [/^grid-cols-\[(.+)\]$/, ([, v]) => ({ "grid-template-columns": v.replace(/,/g, " ") })],
367
- [/^grid-rows-\[(.+)\]$/, ([, v]) => ({ "grid-template-rows": v.replace(/,/g, " ") })]
344
+ [/^grid-rows-(\d+)$/, ([, d]) => ({ "grid-template-rows": `repeat(${d},minmax(0,1fr))` })]
368
345
  ];
369
346
 
370
347
  const overflowValues = [
@@ -380,11 +357,8 @@ const overflows = [
380
357
 
381
358
  const basicSet = ["auto", "start", "end", "center", "stretch"];
382
359
  const positions = [
383
- ["relative", { position: "relative" }],
384
- ["absolute", { position: "absolute" }],
385
- ["fixed", { position: "fixed" }],
386
- ["sticky", { position: "sticky" }],
387
- ["static", { position: "static" }]
360
+ [/^(?:position-|pos-)?(relative|absolute|fixed|sticky)$/, ([, v]) => ({ position: v })],
361
+ [/^(?:position-|pos-)?(static)$/, ([, v]) => ({ position: v })]
388
362
  ];
389
363
  const justifies = [
390
364
  ["justify-start", { "justify-content": "flex-start" }],
@@ -397,7 +371,9 @@ const justifies = [
397
371
  ...basicSet.map((i) => [`justify-self-${i}`, { "justify-self": i }])
398
372
  ];
399
373
  const orders = [
400
- [/^order-(.+)$/, ([, v]) => ({ order: { first: "-9999", last: "9999" }[v] || utilities.handler.bracket.number(v) })],
374
+ [/^order-(.+)$/, ([, v]) => ({ order: utilities.handler.bracket.number(v) })],
375
+ ["order-first", { order: "-9999" }],
376
+ ["order-last", { order: "9999" }],
401
377
  ["order-none", { order: "0" }]
402
378
  ];
403
379
  const alignments = [
@@ -433,17 +409,20 @@ function handleInsetValue(v) {
433
409
  return { auto: "auto", full: "100%" }[v] ?? utilities.handler.bracket.fraction.cssvar.auto.rem(v);
434
410
  }
435
411
  const insets = [
436
- [/^(top|left|right|bottom|inset)-(.+)$/, ([, d, v]) => ({ [d]: handleInsetValue(v) })],
437
- [/^inset-([xy])-(.+)$/, ([, d, v]) => {
412
+ [/^(?:position-|pos-)?(top|left|right|bottom|inset)-(.+)$/, ([, d, v]) => ({ [d]: handleInsetValue(v) })],
413
+ [/^(?:position-|pos-)?inset-([xy])-(.+)$/, ([, d, v]) => {
438
414
  const r = handleInsetValue(v);
439
415
  if (r != null && d in utilities.directionMap)
440
416
  return utilities.directionMap[d].map((i) => [i.slice(1), r]);
441
417
  }]
442
418
  ];
443
419
  const floats = [
444
- [/^float-(left|right)$/, ([, value]) => ({ float: value })],
420
+ ["float-left", { float: "left" }],
421
+ ["float-right", { float: "right" }],
445
422
  ["float-none", { float: "none" }],
446
- [/^clear-(left|right|both)$/, ([, value]) => ({ clear: value })],
423
+ ["clear-left", { clear: "left" }],
424
+ ["clear-right", { clear: "right" }],
425
+ ["clear-both", { clear: "both" }],
447
426
  ["clear-none", { clear: "none" }]
448
427
  ];
449
428
  const zIndexes = [
@@ -451,14 +430,11 @@ const zIndexes = [
451
430
  [/^z-([^-]+)$/, ([, v]) => ({ "z-index": utilities.handler.number(v) })]
452
431
  ];
453
432
  const boxSizing = [
454
- [
455
- /^box-(border|content)$/,
456
- ([, value]) => ({
457
- "box-sizing": `${value}-box`
458
- })
459
- ]
433
+ ["box-border", { "box-sizing": "border-box" }],
434
+ ["box-content", { "box-sizing": "content-box" }]
460
435
  ];
461
436
 
437
+ const varEmptyFn = core.cacheFunction((prefix) => `var(--${prefix}empty,/*!*/ /*!*/)`);
462
438
  const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
463
439
  const displays = [
464
440
  ["inline", { display: "inline" }],
@@ -489,7 +465,9 @@ const resizes = [
489
465
  ["resize-none", { resize: "none" }]
490
466
  ];
491
467
  const userSelects = [
492
- [/^select-(text|all|auto)$/, ([, v]) => ({ "user-select": v })],
468
+ ["select-auto", { "user-select": "auto" }],
469
+ ["select-all", { "user-select": "all" }],
470
+ ["select-text", { "user-select": "text" }],
493
471
  ["select-none", { "user-select": "none" }]
494
472
  ];
495
473
  const whitespaces = [
@@ -532,30 +510,28 @@ const fontSmoothings = [
532
510
  ];
533
511
 
534
512
  const rings = [
535
- [/^ring-?(.*)$/, ([, d]) => {
513
+ [/^ring-?(.*)$/, ([, d], { options: { variablePrefix: p } }) => {
536
514
  const value = utilities.handler.px(d || "1");
537
515
  if (value) {
538
516
  return {
539
- "--un-ring-inset": varEmpty,
540
- "--un-ring-offset-width": "0px",
541
- "--un-ring-offset-color": "#fff",
542
- "--un-ring-color": "rgba(59, 130, 246, .5)",
543
- "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
544
- "--un-ring-shadow": `var(--un-ring-inset) 0 0 0 calc(${value} + var(--un-ring-offset-width)) var(--un-ring-color)`,
545
- "-webkit-box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)",
546
- "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)"
517
+ [`--${p}ring-inset`]: varEmptyFn(p),
518
+ [`--${p}ring-offset-width`]: "0px",
519
+ [`--${p}ring-offset-color`]: "#fff",
520
+ [`--${p}ring-color`]: "rgba(59, 130, 246, .5)",
521
+ [`--${p}ring-offset-shadow`]: `var(--${p}ring-inset) 0 0 0 var(--${p}ring-offset-width) var(--${p}ring-offset-color)`,
522
+ [`--${p}ring-shadow`]: `var(--${p}ring-inset) 0 0 0 calc(${value} + var(--${p}ring-offset-width)) var(--${p}ring-color)`,
523
+ "-webkit-box-shadow": `var(--${p}ring-offset-shadow), var(--${p}ring-shadow), var(--${p}shadow, 0 0 #0000)`,
524
+ "box-shadow": `var(--${p}ring-offset-shadow), var(--${p}ring-shadow), var(--${p}shadow, 0 0 #0000)`
547
525
  };
548
526
  }
549
527
  }],
550
- ["ring-offset", { "--un-ring-offset-width": "1px" }],
551
- [/^ring-offset-(.+)$/, ([, d]) => {
552
- const value = utilities.handler.px(d || "1");
553
- if (value)
554
- return { "--un-ring-offset-width": value };
555
- }],
556
- ["ring-inset", { "--un-ring-inset": "inset" }],
557
- ...ringColors,
558
- ...ringOffsetColors
528
+ [/^ring-offset$/, (_, { options: { variablePrefix: p } }) => ({ [`--${p}ring-offset-width`]: "1px" })],
529
+ [/^ring-offset-(.+)$/, ([, d], { options: { variablePrefix: p } }) => ({ [`--${p}ring-offset-width`]: utilities.handler.px(d || "1") })],
530
+ [/^ring-(.+)$/, (m, ctx) => utilities.colorResolver(`--${ctx.options.variablePrefix}ring-color`, "ring")(m, ctx)],
531
+ [/^ring-op(?:acity)?-?(.+)$/, ([, opacity], { options: { variablePrefix: p } }) => ({ [`--${p}ring-opacity`]: utilities.handler.bracket.percent(opacity) })],
532
+ [/^ring-offset-(.+)$/, (m, ctx) => utilities.colorResolver(`--${ctx.options.variablePrefix}ring-offset-color`, "ring-offset")(m, ctx)],
533
+ [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity], { options: { variablePrefix: p } }) => ({ [`--${p}ring-offset-opacity`]: utilities.handler.bracket.percent(opacity) })],
534
+ [/^ring-inset$/, (_, { options: { variablePrefix: p } }) => ({ [`--${p}ring-inset`]: "inset" })]
559
535
  ];
560
536
 
561
537
  const colorResolver = (body, theme) => {
@@ -585,10 +561,8 @@ const boxShadows = [
585
561
  "box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
586
562
  };
587
563
  }
588
- const color = colorResolver(d, theme);
589
- if (color)
590
- return color;
591
- }]
564
+ }],
565
+ [/^shadow-(.+)$/, ([, d], { theme }) => colorResolver(d, theme)]
592
566
  ];
593
567
 
594
568
  function getPropName(minmax, hw) {
@@ -661,6 +635,8 @@ const transforms = [
661
635
  [/^scale-([xyz])-(.+)$/, handleScale],
662
636
  [/^rotate-(.+)$/, handleRotate],
663
637
  [/^rotate-((?!\[)[^-]+?)(?:deg)?$/, handleRotateWithUnit],
638
+ [/^skew-([xy])-(.+)$/, handleSkew],
639
+ [/^skew-([xy])-((?!\[)[^-]+?)(?:deg)?$/, handleSkewWithUnit],
664
640
  ["transform-gpu", transformGpu],
665
641
  ["transform-cpu", transformCpu],
666
642
  ["transform-none", { transform: "none" }],
@@ -714,6 +690,24 @@ function handleRotate([, b]) {
714
690
  ];
715
691
  }
716
692
  }
693
+ function handleSkewWithUnit([, d, b]) {
694
+ const v = utilities.handler.bracket.number(b);
695
+ if (v != null) {
696
+ return [
697
+ transformBase,
698
+ { [`--un-skew-${d}`]: `${v}deg` }
699
+ ];
700
+ }
701
+ }
702
+ function handleSkew([, d, b]) {
703
+ const v = utilities.handler.bracket(b);
704
+ if (v != null) {
705
+ return [
706
+ transformBase,
707
+ { [`--un-skew-${d}`]: v }
708
+ ];
709
+ }
710
+ }
717
711
 
718
712
  const variablesAbbrMap = {
719
713
  "visible": "visibility",
@@ -775,14 +769,8 @@ const textDecorations = [
775
769
  ["line-through", { "text-decoration": "line-through" }],
776
770
  ["decoration-underline", { "text-decoration": "underline" }],
777
771
  ["decoration-line-through", { "text-decoration": "line-through" }],
778
- [/^(?:underline|decoration)-(solid|double|dotted|dashed|wavy)$/, ([, d]) => ({ "text-decoration-style": d })],
779
- [/^(?:underline|decoration)-([^-]+)$/, ([, s]) => ({ "text-decoration-thickness": ["auto", "from-font"].includes(s) ? s : utilities.handler.bracket.px(s) })],
780
- [/^decoration-(.+)$/, ([, d]) => ({ "text-decoration-thickness": utilities.handler.bracket.px(d) })],
781
- [/^underline-offset-([^-]+)$/, ([, s]) => {
782
- const v = s === "auto" ? s : utilities.handler.bracket.px(s);
783
- if (v != null)
784
- return { "text-underline-offset": v };
785
- }],
772
+ [/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s]) => ({ "text-decoration-thickness": utilities.handler.bracket.px(s) })],
773
+ [/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s })],
786
774
  [/^(?:underline|decoration)-(.+)$/, (match, ctx) => {
787
775
  const result = utilities.colorResolver("text-decoration-color", "line")(match, ctx);
788
776
  if (result) {
@@ -793,6 +781,8 @@ const textDecorations = [
793
781
  }
794
782
  }],
795
783
  [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": utilities.handler.bracket.percent(opacity) })],
784
+ [/^underline-offset-(.+)$/, ([, s]) => ({ "text-underline-offset": utilities.handler.auto.bracket.px(s) })],
785
+ [/^(?:underline|decoration)-(solid|double|dotted|dashed|wavy|inherit|initial|revert|unset)$/, ([, d]) => ({ "text-decoration-style": d })],
796
786
  ["no-underline", { "text-decoration": "none" }],
797
787
  ["decoration-none", { "text-decoration": "none" }]
798
788
  ];
@@ -852,7 +842,6 @@ const rules = [
852
842
  overflows,
853
843
  outline,
854
844
  appearance,
855
- placeholder,
856
845
  positions,
857
846
  orders,
858
847
  justifies,
@@ -873,7 +862,6 @@ exports.appearance = appearance;
873
862
  exports.appearances = appearances;
874
863
  exports.aspectRatio = aspectRatio;
875
864
  exports.bgColors = bgColors;
876
- exports.borderColors = borderColors;
877
865
  exports.borders = borders;
878
866
  exports.boxShadows = boxShadows;
879
867
  exports.boxSizing = boxSizing;
@@ -897,14 +885,11 @@ exports.orders = orders;
897
885
  exports.outline = outline;
898
886
  exports.overflows = overflows;
899
887
  exports.paddings = paddings;
900
- exports.placeholder = placeholder;
901
888
  exports.placements = placements;
902
889
  exports.pointerEvents = pointerEvents;
903
890
  exports.positions = positions;
904
891
  exports.questionMark = questionMark;
905
892
  exports.resizes = resizes;
906
- exports.ringColors = ringColors;
907
- exports.ringOffsetColors = ringOffsetColors;
908
893
  exports.rings = rings;
909
894
  exports.rules = rules;
910
895
  exports.sizes = sizes;
@@ -922,6 +907,7 @@ exports.transforms = transforms;
922
907
  exports.transitions = transitions;
923
908
  exports.userSelects = userSelects;
924
909
  exports.varEmpty = varEmpty;
910
+ exports.varEmptyFn = varEmptyFn;
925
911
  exports.verticalAligns = verticalAligns;
926
912
  exports.whitespaces = whitespaces;
927
913
  exports.willChange = willChange;