@alivecss/aliveui 1.0.2 → 1.0.5

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.js CHANGED
@@ -593,6 +593,9 @@ function generateBase(_config) {
593
593
  ::before,
594
594
  ::after {
595
595
  box-sizing: border-box;
596
+ border-width: 0;
597
+ border-style: solid;
598
+ border-color: currentColor;
596
599
  }
597
600
 
598
601
  html {
@@ -612,6 +615,39 @@ body {
612
615
  -moz-osx-font-smoothing: grayscale;
613
616
  }
614
617
 
618
+ blockquote,
619
+ dl,
620
+ dd,
621
+ h1,
622
+ h2,
623
+ h3,
624
+ h4,
625
+ h5,
626
+ h6,
627
+ hr,
628
+ figure,
629
+ p,
630
+ pre {
631
+ margin: 0;
632
+ }
633
+
634
+ fieldset {
635
+ margin: 0;
636
+ padding: 0;
637
+ }
638
+
639
+ legend {
640
+ padding: 0;
641
+ }
642
+
643
+ ol,
644
+ ul,
645
+ menu {
646
+ list-style: none;
647
+ margin: 0;
648
+ padding: 0;
649
+ }
650
+
615
651
  button,
616
652
  input,
617
653
  optgroup,
@@ -621,9 +657,24 @@ textarea {
621
657
  font-size: 100%;
622
658
  font-weight: inherit;
623
659
  line-height: inherit;
660
+ letter-spacing: inherit;
624
661
  color: inherit;
625
662
  margin: 0;
626
663
  padding: 0;
664
+ background-color: transparent;
665
+ background-image: none;
666
+ }
667
+
668
+ button,
669
+ [type='button'],
670
+ [type='reset'],
671
+ [type='submit'] {
672
+ -webkit-appearance: button;
673
+ cursor: pointer;
674
+ }
675
+
676
+ :disabled {
677
+ cursor: default;
627
678
  }
628
679
 
629
680
  button,
@@ -631,6 +682,28 @@ select {
631
682
  text-transform: none;
632
683
  }
633
684
 
685
+ img,
686
+ svg,
687
+ video,
688
+ canvas,
689
+ audio,
690
+ iframe,
691
+ embed,
692
+ object {
693
+ display: block;
694
+ vertical-align: middle;
695
+ }
696
+
697
+ img,
698
+ video {
699
+ max-width: 100%;
700
+ height: auto;
701
+ }
702
+
703
+ [hidden] {
704
+ display: none;
705
+ }
706
+
634
707
  /* \u2500\u2500 Design tokens \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
635
708
  :root {
636
709
  /* Motion durations */
@@ -828,6 +901,30 @@ select {
828
901
  .alive-loop-ping { animation: alive-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
829
902
  .alive-loop-bounce { animation: alive-bounce 1s infinite; }
830
903
 
904
+ /* \u2500\u2500 Scroll-reveal (data-alive-scroll) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
905
+
906
+ [data-alive-scroll] {
907
+ opacity: 0;
908
+ transform: translateY(8px);
909
+ }
910
+ [data-alive-scroll].is-visible {
911
+ animation: alive-fade-up var(--alive-duration-slow) var(--alive-ease-emphasized) both;
912
+ }
913
+ [data-alive-scroll="fade"] {
914
+ opacity: 0;
915
+ transform: none;
916
+ }
917
+ [data-alive-scroll="fade"].is-visible {
918
+ animation: alive-fade-in var(--alive-duration-normal) var(--alive-ease-standard) both;
919
+ }
920
+ [data-alive-scroll="scale"] {
921
+ opacity: 0;
922
+ transform: scale(0.94);
923
+ }
924
+ [data-alive-scroll="scale"].is-visible {
925
+ animation: alive-scale-in var(--alive-duration-slow) var(--alive-ease-emphasized) both;
926
+ }
927
+
831
928
  /* Reduced motion \u2014 respect system preference */
832
929
  @media (prefers-reduced-motion: reduce) {
833
930
  .alive-enter,
@@ -850,6 +947,18 @@ select {
850
947
  transform: none;
851
948
  }
852
949
 
950
+ [data-alive-scroll],
951
+ [data-alive-scroll="fade"],
952
+ [data-alive-scroll="scale"] {
953
+ opacity: 1;
954
+ transform: none;
955
+ }
956
+ [data-alive-scroll].is-visible,
957
+ [data-alive-scroll="fade"].is-visible,
958
+ [data-alive-scroll="scale"].is-visible {
959
+ animation: none;
960
+ }
961
+
853
962
  /* depth system \u2014 disable hover lift and active press */
854
963
  .d2,
855
964
  .d2:hover,
@@ -2201,6 +2310,19 @@ function resolveColor(colors, name, shade) {
2201
2310
  if (!Object.prototype.hasOwnProperty.call(entry, shade)) return null;
2202
2311
  return entry[shade] ?? null;
2203
2312
  }
2313
+ function applyOpacity(value, opacity) {
2314
+ const alpha = +(opacity / 100).toFixed(3);
2315
+ const hexMatch = value.match(/^#([0-9a-fA-F]{3,6})$/);
2316
+ if (hexMatch) {
2317
+ let hex = hexMatch[1];
2318
+ if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
2319
+ const r = parseInt(hex.slice(0, 2), 16);
2320
+ const g = parseInt(hex.slice(2, 4), 16);
2321
+ const b = parseInt(hex.slice(4, 6), 16);
2322
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
2323
+ }
2324
+ return `color-mix(in srgb, ${value} ${opacity}%, transparent)`;
2325
+ }
2204
2326
  function parseVariants(cls) {
2205
2327
  const variants = [];
2206
2328
  let depth = 0;
@@ -2240,7 +2362,7 @@ function matchColor(cls, colors) {
2240
2362
  if (bgMatch) {
2241
2363
  const value = resolveColor(colors, bgMatch[1], bgMatch[2]);
2242
2364
  if (value) {
2243
- return `.${cls} {
2365
+ return `.${escapeSelector(cls)} {
2244
2366
  background-color: ${value};${transitioned("background-color")}
2245
2367
  }`;
2246
2368
  }
@@ -2249,7 +2371,7 @@ function matchColor(cls, colors) {
2249
2371
  if (textColorMatch) {
2250
2372
  const value = resolveColor(colors, textColorMatch[1], textColorMatch[2]);
2251
2373
  if (value) {
2252
- return `.${cls} {
2374
+ return `.${escapeSelector(cls)} {
2253
2375
  color: ${value};${transitioned("color")}
2254
2376
  }`;
2255
2377
  }
@@ -2258,7 +2380,7 @@ function matchColor(cls, colors) {
2258
2380
  if (borderColorMatch) {
2259
2381
  const value = resolveColor(colors, borderColorMatch[1], borderColorMatch[2]);
2260
2382
  if (value) {
2261
- return `.${cls} {
2383
+ return `.${escapeSelector(cls)} {
2262
2384
  border-color: ${value};${transitioned("border-color")}
2263
2385
  }`;
2264
2386
  }
@@ -2267,7 +2389,7 @@ function matchColor(cls, colors) {
2267
2389
  if (ringColorMatch) {
2268
2390
  const value = resolveColor(colors, ringColorMatch[1], ringColorMatch[2]);
2269
2391
  if (value) {
2270
- return `.${cls} {
2392
+ return `.${escapeSelector(cls)} {
2271
2393
  --alive-ring-color: ${value};
2272
2394
  }`;
2273
2395
  }
@@ -2276,7 +2398,7 @@ function matchColor(cls, colors) {
2276
2398
  if (outlineColorMatch) {
2277
2399
  const value = resolveColor(colors, outlineColorMatch[1], outlineColorMatch[2]);
2278
2400
  if (value) {
2279
- return `.${cls} {
2401
+ return `.${escapeSelector(cls)} {
2280
2402
  outline-color: ${value};
2281
2403
  }`;
2282
2404
  }
@@ -2285,7 +2407,7 @@ function matchColor(cls, colors) {
2285
2407
  if (fillMatch) {
2286
2408
  const value = resolveColor(colors, fillMatch[1], fillMatch[2]);
2287
2409
  if (value) {
2288
- return `.${cls} {
2410
+ return `.${escapeSelector(cls)} {
2289
2411
  fill: ${value};
2290
2412
  }`;
2291
2413
  }
@@ -2294,7 +2416,7 @@ function matchColor(cls, colors) {
2294
2416
  if (strokeMatch) {
2295
2417
  const value = resolveColor(colors, strokeMatch[1], strokeMatch[2]);
2296
2418
  if (value) {
2297
- return `.${cls} {
2419
+ return `.${escapeSelector(cls)} {
2298
2420
  stroke: ${value};
2299
2421
  }`;
2300
2422
  }
@@ -2303,7 +2425,7 @@ function matchColor(cls, colors) {
2303
2425
  if (decorationMatch) {
2304
2426
  const value = resolveColor(colors, decorationMatch[1], decorationMatch[2]);
2305
2427
  if (value) {
2306
- return `.${cls} {
2428
+ return `.${escapeSelector(cls)} {
2307
2429
  text-decoration-color: ${value};
2308
2430
  }`;
2309
2431
  }
@@ -2312,7 +2434,7 @@ function matchColor(cls, colors) {
2312
2434
  if (caretMatch) {
2313
2435
  const value = resolveColor(colors, caretMatch[1], caretMatch[2]);
2314
2436
  if (value) {
2315
- return `.${cls} {
2437
+ return `.${escapeSelector(cls)} {
2316
2438
  caret-color: ${value};
2317
2439
  }`;
2318
2440
  }
@@ -2321,7 +2443,7 @@ function matchColor(cls, colors) {
2321
2443
  if (accentMatch) {
2322
2444
  const value = resolveColor(colors, accentMatch[1], accentMatch[2]);
2323
2445
  if (value) {
2324
- return `.${cls} {
2446
+ return `.${escapeSelector(cls)} {
2325
2447
  accent-color: ${value};
2326
2448
  }`;
2327
2449
  }
@@ -2330,49 +2452,72 @@ function matchColor(cls, colors) {
2330
2452
  if (shadowColorMatch) {
2331
2453
  const value = resolveColor(colors, shadowColorMatch[1], shadowColorMatch[2]);
2332
2454
  if (value) {
2333
- return `.${cls} {
2455
+ return `.${escapeSelector(cls)} {
2334
2456
  --alive-shadow-color: ${value};
2335
2457
  }`;
2336
2458
  }
2337
2459
  }
2338
- const arbBgMatch = cls.match(/^bg-\[(.+)\]$/);
2460
+ const arbBgMatch = cls.match(/^bg-\[(.+)\](?:\/(\d+))?$/);
2339
2461
  if (arbBgMatch) {
2340
- const val = arbBgMatch[1];
2462
+ const [, val, opStr] = arbBgMatch;
2341
2463
  const escaped = escapeSelector(cls);
2342
2464
  if (val.startsWith("url(") || val.startsWith("linear-gradient") || val.startsWith("radial-gradient")) {
2343
2465
  return `.${escaped} {
2344
2466
  background-image: ${val};${transitioned("background-image")}
2345
2467
  }`;
2346
2468
  }
2469
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2347
2470
  return `.${escaped} {
2348
- background-color: ${val};${transitioned("background-color")}
2471
+ background-color: ${colorVal};${transitioned("background-color")}
2349
2472
  }`;
2350
2473
  }
2351
- const arbTextMatch = cls.match(/^text-\[(.+)\]$/);
2474
+ const arbTextMatch = cls.match(/^text-\[(.+)\](?:\/(\d+))?$/);
2352
2475
  if (arbTextMatch) {
2476
+ const [, val, opStr] = arbTextMatch;
2477
+ const isSizeValue = val.endsWith("px") || val.endsWith("em") || val.endsWith("rem") || val.endsWith("%") || val.endsWith("vw") || val.endsWith("vh") || val.endsWith("ch") || val.endsWith("ex") || val.endsWith("dvh") || /^[\d.]/.test(val) || /^(calc|clamp|min|max)\(/.test(val);
2478
+ if (isSizeValue) {
2479
+ return `.${escapeSelector(cls)} {
2480
+ font-size: ${val};
2481
+ }`;
2482
+ }
2483
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2353
2484
  return `.${escapeSelector(cls)} {
2354
- color: ${arbTextMatch[1]};${transitioned("color")}
2485
+ color: ${colorVal};${transitioned("color")}
2355
2486
  }`;
2356
2487
  }
2357
- const arbBorderColorMatch = cls.match(/^border-\[#[0-9a-fA-F]|^border-\[rgb|^border-\[hsl|^border-\[oklch/);
2488
+ const arbBorderColorMatch = cls.match(/^border-\[(.+)\](?:\/(\d+))?$/);
2358
2489
  if (arbBorderColorMatch) {
2359
- const m = cls.match(/^border-\[(.+)\]$/);
2360
- if (m) {
2490
+ const [, val, opStr] = arbBorderColorMatch;
2491
+ const looksLikeColor = val.startsWith("#") || val.startsWith("rgb") || val.startsWith("hsl") || val.startsWith("oklch") || val.startsWith("var(") || val === "transparent" || val === "currentColor";
2492
+ if (looksLikeColor) {
2493
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2361
2494
  return `.${escapeSelector(cls)} {
2362
- border-color: ${m[1]};${transitioned("border-color")}
2495
+ border-color: ${colorVal};${transitioned("border-color")}
2363
2496
  }`;
2364
2497
  }
2365
2498
  }
2366
- const arbFillMatch = cls.match(/^fill-\[(.+)\]$/);
2499
+ const arbRingColorMatch = cls.match(/^ring-\[(.+)\](?:\/(\d+))?$/);
2500
+ if (arbRingColorMatch) {
2501
+ const [, val, opStr] = arbRingColorMatch;
2502
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2503
+ return `.${escapeSelector(cls)} {
2504
+ --alive-ring-color: ${colorVal};
2505
+ }`;
2506
+ }
2507
+ const arbFillMatch = cls.match(/^fill-\[(.+)\](?:\/(\d+))?$/);
2367
2508
  if (arbFillMatch) {
2509
+ const [, val, opStr] = arbFillMatch;
2510
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2368
2511
  return `.${escapeSelector(cls)} {
2369
- fill: ${arbFillMatch[1]};
2512
+ fill: ${colorVal};
2370
2513
  }`;
2371
2514
  }
2372
- const arbStrokeMatch = cls.match(/^stroke-\[(.+)\]$/);
2515
+ const arbStrokeMatch = cls.match(/^stroke-\[(.+)\](?:\/(\d+))?$/);
2373
2516
  if (arbStrokeMatch) {
2517
+ const [, val, opStr] = arbStrokeMatch;
2518
+ const colorVal = opStr ? applyOpacity(val, parseInt(opStr)) : val;
2374
2519
  return `.${escapeSelector(cls)} {
2375
- stroke: ${arbStrokeMatch[1]};
2520
+ stroke: ${colorVal};
2376
2521
  }`;
2377
2522
  }
2378
2523
  return null;
@@ -2394,182 +2539,182 @@ function has(obj, key) {
2394
2539
  function matchSpacing(cls, spacing) {
2395
2540
  const pMatch = cls.match(/^p-(.+)$/);
2396
2541
  if (pMatch && has(spacing, pMatch[1])) {
2397
- return `.${cls} { padding: ${spacing[pMatch[1]]}; }`;
2542
+ return `.${escapeSelector(cls)} { padding: ${spacing[pMatch[1]]}; }`;
2398
2543
  }
2399
2544
  const pxMatch = cls.match(/^px-(.+)$/);
2400
2545
  if (pxMatch && has(spacing, pxMatch[1])) {
2401
- return `.${cls} { padding-left: ${spacing[pxMatch[1]]}; padding-right: ${spacing[pxMatch[1]]}; }`;
2546
+ return `.${escapeSelector(cls)} { padding-left: ${spacing[pxMatch[1]]}; padding-right: ${spacing[pxMatch[1]]}; }`;
2402
2547
  }
2403
2548
  const pyMatch = cls.match(/^py-(.+)$/);
2404
2549
  if (pyMatch && has(spacing, pyMatch[1])) {
2405
- return `.${cls} { padding-top: ${spacing[pyMatch[1]]}; padding-bottom: ${spacing[pyMatch[1]]}; }`;
2550
+ return `.${escapeSelector(cls)} { padding-top: ${spacing[pyMatch[1]]}; padding-bottom: ${spacing[pyMatch[1]]}; }`;
2406
2551
  }
2407
2552
  const ptMatch = cls.match(/^pt-(.+)$/);
2408
2553
  if (ptMatch && has(spacing, ptMatch[1])) {
2409
- return `.${cls} { padding-top: ${spacing[ptMatch[1]]}; }`;
2554
+ return `.${escapeSelector(cls)} { padding-top: ${spacing[ptMatch[1]]}; }`;
2410
2555
  }
2411
2556
  const prMatch = cls.match(/^pr-(.+)$/);
2412
2557
  if (prMatch && has(spacing, prMatch[1])) {
2413
- return `.${cls} { padding-right: ${spacing[prMatch[1]]}; }`;
2558
+ return `.${escapeSelector(cls)} { padding-right: ${spacing[prMatch[1]]}; }`;
2414
2559
  }
2415
2560
  const pbMatch = cls.match(/^pb-(.+)$/);
2416
2561
  if (pbMatch && has(spacing, pbMatch[1])) {
2417
- return `.${cls} { padding-bottom: ${spacing[pbMatch[1]]}; }`;
2562
+ return `.${escapeSelector(cls)} { padding-bottom: ${spacing[pbMatch[1]]}; }`;
2418
2563
  }
2419
2564
  const plMatch = cls.match(/^pl-(.+)$/);
2420
2565
  if (plMatch && has(spacing, plMatch[1])) {
2421
- return `.${cls} { padding-left: ${spacing[plMatch[1]]}; }`;
2566
+ return `.${escapeSelector(cls)} { padding-left: ${spacing[plMatch[1]]}; }`;
2422
2567
  }
2423
2568
  const mMatch = cls.match(/^m-(.+)$/);
2424
2569
  if (mMatch) {
2425
- if (mMatch[1] === "auto") return `.${cls} { margin: auto; }`;
2426
- if (has(spacing, mMatch[1])) return `.${cls} { margin: ${spacing[mMatch[1]]}; }`;
2570
+ if (mMatch[1] === "auto") return `.${escapeSelector(cls)} { margin: auto; }`;
2571
+ if (has(spacing, mMatch[1])) return `.${escapeSelector(cls)} { margin: ${spacing[mMatch[1]]}; }`;
2427
2572
  }
2428
2573
  const mxMatch = cls.match(/^mx-(.+)$/);
2429
2574
  if (mxMatch) {
2430
- if (mxMatch[1] === "auto") return `.${cls} { margin-left: auto; margin-right: auto; }`;
2431
- if (has(spacing, mxMatch[1])) return `.${cls} { margin-left: ${spacing[mxMatch[1]]}; margin-right: ${spacing[mxMatch[1]]}; }`;
2575
+ if (mxMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-left: auto; margin-right: auto; }`;
2576
+ if (has(spacing, mxMatch[1])) return `.${escapeSelector(cls)} { margin-left: ${spacing[mxMatch[1]]}; margin-right: ${spacing[mxMatch[1]]}; }`;
2432
2577
  }
2433
2578
  const myMatch = cls.match(/^my-(.+)$/);
2434
2579
  if (myMatch) {
2435
- if (myMatch[1] === "auto") return `.${cls} { margin-top: auto; margin-bottom: auto; }`;
2436
- if (has(spacing, myMatch[1])) return `.${cls} { margin-top: ${spacing[myMatch[1]]}; margin-bottom: ${spacing[myMatch[1]]}; }`;
2580
+ if (myMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-top: auto; margin-bottom: auto; }`;
2581
+ if (has(spacing, myMatch[1])) return `.${escapeSelector(cls)} { margin-top: ${spacing[myMatch[1]]}; margin-bottom: ${spacing[myMatch[1]]}; }`;
2437
2582
  }
2438
2583
  const mtMatch = cls.match(/^mt-(.+)$/);
2439
2584
  if (mtMatch) {
2440
- if (mtMatch[1] === "auto") return `.${cls} { margin-top: auto; }`;
2441
- if (has(spacing, mtMatch[1])) return `.${cls} { margin-top: ${spacing[mtMatch[1]]}; }`;
2585
+ if (mtMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-top: auto; }`;
2586
+ if (has(spacing, mtMatch[1])) return `.${escapeSelector(cls)} { margin-top: ${spacing[mtMatch[1]]}; }`;
2442
2587
  }
2443
2588
  const mrMatch = cls.match(/^mr-(.+)$/);
2444
2589
  if (mrMatch) {
2445
- if (mrMatch[1] === "auto") return `.${cls} { margin-right: auto; }`;
2446
- if (has(spacing, mrMatch[1])) return `.${cls} { margin-right: ${spacing[mrMatch[1]]}; }`;
2590
+ if (mrMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-right: auto; }`;
2591
+ if (has(spacing, mrMatch[1])) return `.${escapeSelector(cls)} { margin-right: ${spacing[mrMatch[1]]}; }`;
2447
2592
  }
2448
2593
  const mbMatch = cls.match(/^mb-(.+)$/);
2449
2594
  if (mbMatch) {
2450
- if (mbMatch[1] === "auto") return `.${cls} { margin-bottom: auto; }`;
2451
- if (has(spacing, mbMatch[1])) return `.${cls} { margin-bottom: ${spacing[mbMatch[1]]}; }`;
2595
+ if (mbMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-bottom: auto; }`;
2596
+ if (has(spacing, mbMatch[1])) return `.${escapeSelector(cls)} { margin-bottom: ${spacing[mbMatch[1]]}; }`;
2452
2597
  }
2453
2598
  const mlMatch = cls.match(/^ml-(.+)$/);
2454
2599
  if (mlMatch) {
2455
- if (mlMatch[1] === "auto") return `.${cls} { margin-left: auto; }`;
2456
- if (has(spacing, mlMatch[1])) return `.${cls} { margin-left: ${spacing[mlMatch[1]]}; }`;
2600
+ if (mlMatch[1] === "auto") return `.${escapeSelector(cls)} { margin-left: auto; }`;
2601
+ if (has(spacing, mlMatch[1])) return `.${escapeSelector(cls)} { margin-left: ${spacing[mlMatch[1]]}; }`;
2457
2602
  }
2458
2603
  const gapMatch = cls.match(/^gap-(.+)$/);
2459
2604
  if (gapMatch && has(spacing, gapMatch[1])) {
2460
- return `.${cls} { gap: ${spacing[gapMatch[1]]}; }`;
2605
+ return `.${escapeSelector(cls)} { gap: ${spacing[gapMatch[1]]}; }`;
2461
2606
  }
2462
2607
  const gapXMatch = cls.match(/^gap-x-(.+)$/);
2463
2608
  if (gapXMatch && has(spacing, gapXMatch[1])) {
2464
- return `.${cls} { column-gap: ${spacing[gapXMatch[1]]}; }`;
2609
+ return `.${escapeSelector(cls)} { column-gap: ${spacing[gapXMatch[1]]}; }`;
2465
2610
  }
2466
2611
  const gapYMatch = cls.match(/^gap-y-(.+)$/);
2467
2612
  if (gapYMatch && has(spacing, gapYMatch[1])) {
2468
- return `.${cls} { row-gap: ${spacing[gapYMatch[1]]}; }`;
2613
+ return `.${escapeSelector(cls)} { row-gap: ${spacing[gapYMatch[1]]}; }`;
2469
2614
  }
2470
2615
  const spaceXMatch = cls.match(/^space-x-(.+)$/);
2471
2616
  if (spaceXMatch && has(spacing, spaceXMatch[1])) {
2472
- return `.${cls} > * + * { margin-left: ${spacing[spaceXMatch[1]]}; }`;
2617
+ return `.${escapeSelector(cls)}> * + * { margin-left: ${spacing[spaceXMatch[1]]}; }`;
2473
2618
  }
2474
2619
  const spaceYMatch = cls.match(/^space-y-(.+)$/);
2475
2620
  if (spaceYMatch && has(spacing, spaceYMatch[1])) {
2476
- return `.${cls} > * + * { margin-top: ${spacing[spaceYMatch[1]]}; }`;
2621
+ return `.${escapeSelector(cls)}> * + * { margin-top: ${spacing[spaceYMatch[1]]}; }`;
2477
2622
  }
2478
2623
  const insetMatch = cls.match(/^inset-(.+)$/);
2479
2624
  if (insetMatch) {
2480
- if (insetMatch[1] === "auto") return `.${cls} { inset: auto; }`;
2481
- if (insetMatch[1] === "0") return `.${cls} { inset: 0px; }`;
2482
- if (has(spacing, insetMatch[1])) return `.${cls} { inset: ${spacing[insetMatch[1]]}; }`;
2625
+ if (insetMatch[1] === "auto") return `.${escapeSelector(cls)} { inset: auto; }`;
2626
+ if (insetMatch[1] === "0") return `.${escapeSelector(cls)} { inset: 0px; }`;
2627
+ if (has(spacing, insetMatch[1])) return `.${escapeSelector(cls)} { inset: ${spacing[insetMatch[1]]}; }`;
2483
2628
  }
2484
2629
  const insetXMatch = cls.match(/^inset-x-(.+)$/);
2485
2630
  if (insetXMatch) {
2486
2631
  const val = insetXMatch[1] === "auto" ? "auto" : insetXMatch[1] === "0" ? "0px" : has(spacing, insetXMatch[1]) ? spacing[insetXMatch[1]] : void 0;
2487
- if (val) return `.${cls} { left: ${val}; right: ${val}; }`;
2632
+ if (val) return `.${escapeSelector(cls)} { left: ${val}; right: ${val}; }`;
2488
2633
  }
2489
2634
  const insetYMatch = cls.match(/^inset-y-(.+)$/);
2490
2635
  if (insetYMatch) {
2491
2636
  const val = insetYMatch[1] === "auto" ? "auto" : insetYMatch[1] === "0" ? "0px" : has(spacing, insetYMatch[1]) ? spacing[insetYMatch[1]] : void 0;
2492
- if (val) return `.${cls} { top: ${val}; bottom: ${val}; }`;
2637
+ if (val) return `.${escapeSelector(cls)} { top: ${val}; bottom: ${val}; }`;
2493
2638
  }
2494
2639
  const topMatch = cls.match(/^top-(.+)$/);
2495
2640
  if (topMatch) {
2496
- if (topMatch[1] === "auto") return `.${cls} { top: auto; }`;
2497
- if (topMatch[1] === "0") return `.${cls} { top: 0px; }`;
2498
- if (has(spacing, topMatch[1])) return `.${cls} { top: ${spacing[topMatch[1]]}; }`;
2641
+ if (topMatch[1] === "auto") return `.${escapeSelector(cls)} { top: auto; }`;
2642
+ if (topMatch[1] === "0") return `.${escapeSelector(cls)} { top: 0px; }`;
2643
+ if (has(spacing, topMatch[1])) return `.${escapeSelector(cls)} { top: ${spacing[topMatch[1]]}; }`;
2499
2644
  }
2500
2645
  const rightMatch = cls.match(/^right-(.+)$/);
2501
2646
  if (rightMatch) {
2502
- if (rightMatch[1] === "auto") return `.${cls} { right: auto; }`;
2503
- if (rightMatch[1] === "0") return `.${cls} { right: 0px; }`;
2504
- if (has(spacing, rightMatch[1])) return `.${cls} { right: ${spacing[rightMatch[1]]}; }`;
2647
+ if (rightMatch[1] === "auto") return `.${escapeSelector(cls)} { right: auto; }`;
2648
+ if (rightMatch[1] === "0") return `.${escapeSelector(cls)} { right: 0px; }`;
2649
+ if (has(spacing, rightMatch[1])) return `.${escapeSelector(cls)} { right: ${spacing[rightMatch[1]]}; }`;
2505
2650
  }
2506
2651
  const bottomMatch = cls.match(/^bottom-(.+)$/);
2507
2652
  if (bottomMatch) {
2508
- if (bottomMatch[1] === "auto") return `.${cls} { bottom: auto; }`;
2509
- if (bottomMatch[1] === "0") return `.${cls} { bottom: 0px; }`;
2510
- if (has(spacing, bottomMatch[1])) return `.${cls} { bottom: ${spacing[bottomMatch[1]]}; }`;
2653
+ if (bottomMatch[1] === "auto") return `.${escapeSelector(cls)} { bottom: auto; }`;
2654
+ if (bottomMatch[1] === "0") return `.${escapeSelector(cls)} { bottom: 0px; }`;
2655
+ if (has(spacing, bottomMatch[1])) return `.${escapeSelector(cls)} { bottom: ${spacing[bottomMatch[1]]}; }`;
2511
2656
  }
2512
2657
  const leftMatch = cls.match(/^left-(.+)$/);
2513
2658
  if (leftMatch) {
2514
- if (leftMatch[1] === "auto") return `.${cls} { left: auto; }`;
2515
- if (leftMatch[1] === "0") return `.${cls} { left: 0px; }`;
2516
- if (has(spacing, leftMatch[1])) return `.${cls} { left: ${spacing[leftMatch[1]]}; }`;
2659
+ if (leftMatch[1] === "auto") return `.${escapeSelector(cls)} { left: auto; }`;
2660
+ if (leftMatch[1] === "0") return `.${escapeSelector(cls)} { left: 0px; }`;
2661
+ if (has(spacing, leftMatch[1])) return `.${escapeSelector(cls)} { left: ${spacing[leftMatch[1]]}; }`;
2517
2662
  }
2518
2663
  const negMMatch = cls.match(/^-m-(.+)$/);
2519
2664
  if (negMMatch && has(spacing, negMMatch[1])) {
2520
- return `.\\-m-${negMMatch[1]} { margin: -${spacing[negMMatch[1]]}; }`;
2665
+ return `.${escapeSelector(cls)} { margin: -${spacing[negMMatch[1]]}; }`;
2521
2666
  }
2522
2667
  const negMxMatch = cls.match(/^-mx-(.+)$/);
2523
2668
  if (negMxMatch && has(spacing, negMxMatch[1])) {
2524
- return `.\\-mx-${negMxMatch[1]} { margin-left: -${spacing[negMxMatch[1]]}; margin-right: -${spacing[negMxMatch[1]]}; }`;
2669
+ return `.${escapeSelector(cls)} { margin-left: -${spacing[negMxMatch[1]]}; margin-right: -${spacing[negMxMatch[1]]}; }`;
2525
2670
  }
2526
2671
  const negMyMatch = cls.match(/^-my-(.+)$/);
2527
2672
  if (negMyMatch && has(spacing, negMyMatch[1])) {
2528
- return `.\\-my-${negMyMatch[1]} { margin-top: -${spacing[negMyMatch[1]]}; margin-bottom: -${spacing[negMyMatch[1]]}; }`;
2673
+ return `.${escapeSelector(cls)} { margin-top: -${spacing[negMyMatch[1]]}; margin-bottom: -${spacing[negMyMatch[1]]}; }`;
2529
2674
  }
2530
2675
  const negMtMatch = cls.match(/^-mt-(.+)$/);
2531
2676
  if (negMtMatch && has(spacing, negMtMatch[1])) {
2532
- return `.\\-mt-${negMtMatch[1]} { margin-top: -${spacing[negMtMatch[1]]}; }`;
2677
+ return `.${escapeSelector(cls)} { margin-top: -${spacing[negMtMatch[1]]}; }`;
2533
2678
  }
2534
2679
  const negMrMatch = cls.match(/^-mr-(.+)$/);
2535
2680
  if (negMrMatch && has(spacing, negMrMatch[1])) {
2536
- return `.\\-mr-${negMrMatch[1]} { margin-right: -${spacing[negMrMatch[1]]}; }`;
2681
+ return `.${escapeSelector(cls)} { margin-right: -${spacing[negMrMatch[1]]}; }`;
2537
2682
  }
2538
2683
  const negMbMatch = cls.match(/^-mb-(.+)$/);
2539
2684
  if (negMbMatch && has(spacing, negMbMatch[1])) {
2540
- return `.\\-mb-${negMbMatch[1]} { margin-bottom: -${spacing[negMbMatch[1]]}; }`;
2685
+ return `.${escapeSelector(cls)} { margin-bottom: -${spacing[negMbMatch[1]]}; }`;
2541
2686
  }
2542
2687
  const negMlMatch = cls.match(/^-ml-(.+)$/);
2543
2688
  if (negMlMatch && has(spacing, negMlMatch[1])) {
2544
- return `.\\-ml-${negMlMatch[1]} { margin-left: -${spacing[negMlMatch[1]]}; }`;
2689
+ return `.${escapeSelector(cls)} { margin-left: -${spacing[negMlMatch[1]]}; }`;
2545
2690
  }
2546
2691
  const negInsetMatch = cls.match(/^-inset-(.+)$/);
2547
2692
  if (negInsetMatch && has(spacing, negInsetMatch[1])) {
2548
- return `.\\-inset-${negInsetMatch[1]} { inset: -${spacing[negInsetMatch[1]]}; }`;
2693
+ return `.${escapeSelector(cls)} { inset: -${spacing[negInsetMatch[1]]}; }`;
2549
2694
  }
2550
2695
  const negInsetXMatch = cls.match(/^-inset-x-(.+)$/);
2551
2696
  if (negInsetXMatch && has(spacing, negInsetXMatch[1])) {
2552
- return `.\\-inset-x-${negInsetXMatch[1]} { left: -${spacing[negInsetXMatch[1]]}; right: -${spacing[negInsetXMatch[1]]}; }`;
2697
+ return `.${escapeSelector(cls)} { left: -${spacing[negInsetXMatch[1]]}; right: -${spacing[negInsetXMatch[1]]}; }`;
2553
2698
  }
2554
2699
  const negInsetYMatch = cls.match(/^-inset-y-(.+)$/);
2555
2700
  if (negInsetYMatch && has(spacing, negInsetYMatch[1])) {
2556
- return `.\\-inset-y-${negInsetYMatch[1]} { top: -${spacing[negInsetYMatch[1]]}; bottom: -${spacing[negInsetYMatch[1]]}; }`;
2701
+ return `.${escapeSelector(cls)} { top: -${spacing[negInsetYMatch[1]]}; bottom: -${spacing[negInsetYMatch[1]]}; }`;
2557
2702
  }
2558
2703
  const negTopMatch = cls.match(/^-top-(.+)$/);
2559
2704
  if (negTopMatch && has(spacing, negTopMatch[1])) {
2560
- return `.\\-top-${negTopMatch[1]} { top: -${spacing[negTopMatch[1]]}; }`;
2705
+ return `.${escapeSelector(cls)} { top: -${spacing[negTopMatch[1]]}; }`;
2561
2706
  }
2562
2707
  const negRightMatch = cls.match(/^-right-(.+)$/);
2563
2708
  if (negRightMatch && has(spacing, negRightMatch[1])) {
2564
- return `.\\-right-${negRightMatch[1]} { right: -${spacing[negRightMatch[1]]}; }`;
2709
+ return `.${escapeSelector(cls)} { right: -${spacing[negRightMatch[1]]}; }`;
2565
2710
  }
2566
2711
  const negBottomMatch = cls.match(/^-bottom-(.+)$/);
2567
2712
  if (negBottomMatch && has(spacing, negBottomMatch[1])) {
2568
- return `.\\-bottom-${negBottomMatch[1]} { bottom: -${spacing[negBottomMatch[1]]}; }`;
2713
+ return `.${escapeSelector(cls)} { bottom: -${spacing[negBottomMatch[1]]}; }`;
2569
2714
  }
2570
2715
  const negLeftMatch = cls.match(/^-left-(.+)$/);
2571
2716
  if (negLeftMatch && has(spacing, negLeftMatch[1])) {
2572
- return `.\\-left-${negLeftMatch[1]} { left: -${spacing[negLeftMatch[1]]}; }`;
2717
+ return `.${escapeSelector(cls)} { left: -${spacing[negLeftMatch[1]]}; }`;
2573
2718
  }
2574
2719
  const arbSpacingMatch = cls.match(/^(w|h|p|m|pt|pr|pb|pl|px|py|mt|mr|mb|ml|mx|my|gap|gap-x|gap-y|top|right|bottom|left|inset|inset-x|inset-y)-\[(.+)\]$/);
2575
2720
  if (arbSpacingMatch) {
@@ -2650,21 +2795,21 @@ function matchTypography(cls, fontSize, fontWeight, lineHeight) {
2650
2795
  const textSizeMatch = cls.match(/^text-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/);
2651
2796
  if (textSizeMatch && hasOwn(fontSize, textSizeMatch[1])) {
2652
2797
  const [size, lh] = fontSize[textSizeMatch[1]];
2653
- return `.${cls} {
2798
+ return `.${escapeSelector(cls)} {
2654
2799
  font-size: ${size};
2655
2800
  line-height: ${lh};
2656
2801
  }`;
2657
2802
  }
2658
2803
  const fontWeightMatch = cls.match(/^font-(thin|extralight|light|normal|medium|semibold|bold|extrabold|black)$/);
2659
2804
  if (fontWeightMatch && hasOwn(fontWeight, fontWeightMatch[1])) {
2660
- return `.${cls} { font-weight: ${fontWeight[fontWeightMatch[1]]}; }`;
2805
+ return `.${escapeSelector(cls)} { font-weight: ${fontWeight[fontWeightMatch[1]]}; }`;
2661
2806
  }
2662
- if (cls === "font-sans") return `.${cls} { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }`;
2663
- if (cls === "font-serif") return `.${cls} { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }`;
2664
- if (cls === "font-mono") return `.${cls} { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }`;
2807
+ if (cls === "font-sans") return `.${escapeSelector(cls)} { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }`;
2808
+ if (cls === "font-serif") return `.${escapeSelector(cls)} { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; }`;
2809
+ if (cls === "font-mono") return `.${escapeSelector(cls)} { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }`;
2665
2810
  const leadingMatch = cls.match(/^leading-(.+)$/);
2666
2811
  if (leadingMatch && hasOwn(lineHeight, leadingMatch[1])) {
2667
- return `.${cls} { line-height: ${lineHeight[leadingMatch[1]]}; }`;
2812
+ return `.${escapeSelector(cls)} { line-height: ${lineHeight[leadingMatch[1]]}; }`;
2668
2813
  }
2669
2814
  const trackingMap = {
2670
2815
  tighter: "-0.05em",
@@ -2676,63 +2821,49 @@ function matchTypography(cls, fontSize, fontWeight, lineHeight) {
2676
2821
  };
2677
2822
  const trackingMatch = cls.match(/^tracking-(.+)$/);
2678
2823
  if (trackingMatch && Object.prototype.hasOwnProperty.call(trackingMap, trackingMatch[1])) {
2679
- return `.${cls} { letter-spacing: ${trackingMap[trackingMatch[1]]}; }`;
2680
- }
2681
- if (cls === "text-left") return `.${cls} { text-align: left; }`;
2682
- if (cls === "text-center") return `.${cls} { text-align: center; }`;
2683
- if (cls === "text-right") return `.${cls} { text-align: right; }`;
2684
- if (cls === "text-justify") return `.${cls} { text-align: justify; }`;
2685
- if (cls === "text-start") return `.${cls} { text-align: start; }`;
2686
- if (cls === "text-end") return `.${cls} { text-align: end; }`;
2687
- if (cls === "uppercase") return `.${cls} { text-transform: uppercase; }`;
2688
- if (cls === "lowercase") return `.${cls} { text-transform: lowercase; }`;
2689
- if (cls === "capitalize") return `.${cls} { text-transform: capitalize; }`;
2690
- if (cls === "normal-case") return `.${cls} { text-transform: none; }`;
2691
- if (cls === "underline") return `.${cls} { text-decoration-line: underline; }`;
2692
- if (cls === "overline") return `.${cls} { text-decoration-line: overline; }`;
2693
- if (cls === "line-through") return `.${cls} { text-decoration-line: line-through; }`;
2694
- if (cls === "no-underline") return `.${cls} { text-decoration-line: none; }`;
2695
- if (cls === "truncate") return `.${cls} { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`;
2696
- if (cls === "text-ellipsis") return `.${cls} { text-overflow: ellipsis; }`;
2697
- if (cls === "text-clip") return `.${cls} { text-overflow: clip; }`;
2698
- if (cls === "whitespace-normal") return `.${cls} { white-space: normal; }`;
2699
- if (cls === "whitespace-nowrap") return `.${cls} { white-space: nowrap; }`;
2700
- if (cls === "whitespace-pre") return `.${cls} { white-space: pre; }`;
2701
- if (cls === "whitespace-pre-line") return `.${cls} { white-space: pre-line; }`;
2702
- if (cls === "whitespace-pre-wrap") return `.${cls} { white-space: pre-wrap; }`;
2703
- if (cls === "whitespace-break-spaces") return `.${cls} { white-space: break-spaces; }`;
2704
- if (cls === "italic") return `.${cls} { font-style: italic; }`;
2705
- if (cls === "not-italic") return `.${cls} { font-style: normal; }`;
2706
- if (cls === "tabular-nums") return `.${cls} { font-variant-numeric: tabular-nums; }`;
2707
- if (cls === "oldstyle-nums") return `.${cls} { font-variant-numeric: oldstyle-nums; }`;
2708
- if (cls === "list-none") return `.${cls} { list-style-type: none; }`;
2709
- if (cls === "list-disc") return `.${cls} { list-style-type: disc; }`;
2710
- if (cls === "list-decimal") return `.${cls} { list-style-type: decimal; }`;
2711
- if (cls === "break-normal") return `.${cls} { overflow-wrap: normal; word-break: normal; }`;
2712
- if (cls === "break-words") return `.${cls} { overflow-wrap: break-word; }`;
2713
- if (cls === "break-all") return `.${cls} { word-break: break-all; }`;
2714
- if (cls === "break-keep") return `.${cls} { word-break: keep-all; }`;
2824
+ return `.${escapeSelector(cls)} { letter-spacing: ${trackingMap[trackingMatch[1]]}; }`;
2825
+ }
2826
+ if (cls === "text-left") return `.${escapeSelector(cls)} { text-align: left; }`;
2827
+ if (cls === "text-center") return `.${escapeSelector(cls)} { text-align: center; }`;
2828
+ if (cls === "text-right") return `.${escapeSelector(cls)} { text-align: right; }`;
2829
+ if (cls === "text-justify") return `.${escapeSelector(cls)} { text-align: justify; }`;
2830
+ if (cls === "text-start") return `.${escapeSelector(cls)} { text-align: start; }`;
2831
+ if (cls === "text-end") return `.${escapeSelector(cls)} { text-align: end; }`;
2832
+ if (cls === "uppercase") return `.${escapeSelector(cls)} { text-transform: uppercase; }`;
2833
+ if (cls === "lowercase") return `.${escapeSelector(cls)} { text-transform: lowercase; }`;
2834
+ if (cls === "capitalize") return `.${escapeSelector(cls)} { text-transform: capitalize; }`;
2835
+ if (cls === "normal-case") return `.${escapeSelector(cls)} { text-transform: none; }`;
2836
+ if (cls === "underline") return `.${escapeSelector(cls)} { text-decoration-line: underline; }`;
2837
+ if (cls === "overline") return `.${escapeSelector(cls)} { text-decoration-line: overline; }`;
2838
+ if (cls === "line-through") return `.${escapeSelector(cls)} { text-decoration-line: line-through; }`;
2839
+ if (cls === "no-underline") return `.${escapeSelector(cls)} { text-decoration-line: none; }`;
2840
+ if (cls === "truncate") return `.${escapeSelector(cls)} { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }`;
2841
+ if (cls === "text-ellipsis") return `.${escapeSelector(cls)} { text-overflow: ellipsis; }`;
2842
+ if (cls === "text-clip") return `.${escapeSelector(cls)} { text-overflow: clip; }`;
2843
+ if (cls === "whitespace-normal") return `.${escapeSelector(cls)} { white-space: normal; }`;
2844
+ if (cls === "whitespace-nowrap") return `.${escapeSelector(cls)} { white-space: nowrap; }`;
2845
+ if (cls === "whitespace-pre") return `.${escapeSelector(cls)} { white-space: pre; }`;
2846
+ if (cls === "whitespace-pre-line") return `.${escapeSelector(cls)} { white-space: pre-line; }`;
2847
+ if (cls === "whitespace-pre-wrap") return `.${escapeSelector(cls)} { white-space: pre-wrap; }`;
2848
+ if (cls === "whitespace-break-spaces") return `.${escapeSelector(cls)} { white-space: break-spaces; }`;
2849
+ if (cls === "italic") return `.${escapeSelector(cls)} { font-style: italic; }`;
2850
+ if (cls === "not-italic") return `.${escapeSelector(cls)} { font-style: normal; }`;
2851
+ if (cls === "tabular-nums") return `.${escapeSelector(cls)} { font-variant-numeric: tabular-nums; }`;
2852
+ if (cls === "oldstyle-nums") return `.${escapeSelector(cls)} { font-variant-numeric: oldstyle-nums; }`;
2853
+ if (cls === "list-none") return `.${escapeSelector(cls)} { list-style-type: none; }`;
2854
+ if (cls === "list-disc") return `.${escapeSelector(cls)} { list-style-type: disc; }`;
2855
+ if (cls === "list-decimal") return `.${escapeSelector(cls)} { list-style-type: decimal; }`;
2856
+ if (cls === "break-normal") return `.${escapeSelector(cls)} { overflow-wrap: normal; word-break: normal; }`;
2857
+ if (cls === "break-words") return `.${escapeSelector(cls)} { overflow-wrap: break-word; }`;
2858
+ if (cls === "break-all") return `.${escapeSelector(cls)} { word-break: break-all; }`;
2859
+ if (cls === "break-keep") return `.${escapeSelector(cls)} { word-break: keep-all; }`;
2715
2860
  return null;
2716
2861
  }
2717
2862
 
2718
2863
  // src/generator/layout.ts
2719
- function has2(obj, key) {
2720
- return typeof obj[key] === "string";
2721
- }
2722
- function generateLayout(classes, config) {
2723
- const { spacing } = config.theme;
2864
+ function generateLayout(classes, _config) {
2724
2865
  const rules = [];
2725
2866
  for (const cls of classes) {
2726
- const spaceYMatch = cls.match(/^space-y-(.+)$/);
2727
- if (spaceYMatch && has2(spacing, spaceYMatch[1])) {
2728
- rules.push(`.${escapeSelector(cls)} > * + * { margin-top: ${spacing[spaceYMatch[1]]}; }`);
2729
- continue;
2730
- }
2731
- const spaceXMatch = cls.match(/^space-x-(.+)$/);
2732
- if (spaceXMatch && has2(spacing, spaceXMatch[1])) {
2733
- rules.push(`.${escapeSelector(cls)} > * + * { margin-left: ${spacing[spaceXMatch[1]]}; }`);
2734
- continue;
2735
- }
2736
2867
  const generated = matchLayout(cls);
2737
2868
  if (generated) rules.push(generated);
2738
2869
  }
@@ -2751,7 +2882,7 @@ function matchLayout(cls) {
2751
2882
  hidden: "display: none;",
2752
2883
  contents: "display: contents;"
2753
2884
  };
2754
- if (displayMap[cls]) return `.${cls} { ${displayMap[cls]} }`;
2885
+ if (displayMap[cls]) return `.${escapeSelector(cls)} { ${displayMap[cls]} }`;
2755
2886
  const posMap = {
2756
2887
  static: "position: static;",
2757
2888
  relative: "position: relative;",
@@ -2759,115 +2890,115 @@ function matchLayout(cls) {
2759
2890
  fixed: "position: fixed;",
2760
2891
  sticky: "position: sticky;"
2761
2892
  };
2762
- if (posMap[cls]) return `.${cls} { ${posMap[cls]} }`;
2763
- if (cls === "flex-row") return `.${cls} { flex-direction: row; }`;
2764
- if (cls === "flex-row-reverse") return `.${cls} { flex-direction: row-reverse; }`;
2765
- if (cls === "flex-col") return `.${cls} { flex-direction: column; }`;
2766
- if (cls === "flex-col-reverse") return `.${cls} { flex-direction: column-reverse; }`;
2767
- if (cls === "flex-wrap") return `.${cls} { flex-wrap: wrap; }`;
2768
- if (cls === "flex-nowrap") return `.${cls} { flex-wrap: nowrap; }`;
2769
- if (cls === "flex-wrap-reverse") return `.${cls} { flex-wrap: wrap-reverse; }`;
2770
- if (cls === "flex-1") return `.${cls} { flex: 1 1 0%; }`;
2771
- if (cls === "flex-auto") return `.${cls} { flex: 1 1 auto; }`;
2772
- if (cls === "flex-initial") return `.${cls} { flex: 0 1 auto; }`;
2773
- if (cls === "flex-none") return `.${cls} { flex: none; }`;
2774
- if (cls === "flex-grow") return `.${cls} { flex-grow: 1; }`;
2775
- if (cls === "flex-grow-0") return `.${cls} { flex-grow: 0; }`;
2776
- if (cls === "flex-shrink") return `.${cls} { flex-shrink: 1; }`;
2777
- if (cls === "flex-shrink-0") return `.${cls} { flex-shrink: 0; }`;
2778
- if (cls === "grow") return `.${cls} { flex-grow: 1; }`;
2779
- if (cls === "grow-0") return `.${cls} { flex-grow: 0; }`;
2780
- if (cls === "shrink") return `.${cls} { flex-shrink: 1; }`;
2781
- if (cls === "shrink-0") return `.${cls} { flex-shrink: 0; }`;
2782
- if (cls === "items-start") return `.${cls} { align-items: flex-start; }`;
2783
- if (cls === "items-end") return `.${cls} { align-items: flex-end; }`;
2784
- if (cls === "items-center") return `.${cls} { align-items: center; }`;
2785
- if (cls === "items-baseline") return `.${cls} { align-items: baseline; }`;
2786
- if (cls === "items-stretch") return `.${cls} { align-items: stretch; }`;
2787
- if (cls === "self-auto") return `.${cls} { align-self: auto; }`;
2788
- if (cls === "self-start") return `.${cls} { align-self: flex-start; }`;
2789
- if (cls === "self-end") return `.${cls} { align-self: flex-end; }`;
2790
- if (cls === "self-center") return `.${cls} { align-self: center; }`;
2791
- if (cls === "self-stretch") return `.${cls} { align-self: stretch; }`;
2792
- if (cls === "self-baseline") return `.${cls} { align-self: baseline; }`;
2793
- if (cls === "justify-start") return `.${cls} { justify-content: flex-start; }`;
2794
- if (cls === "justify-end") return `.${cls} { justify-content: flex-end; }`;
2795
- if (cls === "justify-center") return `.${cls} { justify-content: center; }`;
2796
- if (cls === "justify-between") return `.${cls} { justify-content: space-between; }`;
2797
- if (cls === "justify-around") return `.${cls} { justify-content: space-around; }`;
2798
- if (cls === "justify-evenly") return `.${cls} { justify-content: space-evenly; }`;
2799
- if (cls === "justify-stretch") return `.${cls} { justify-content: stretch; }`;
2800
- if (cls === "justify-items-start") return `.${cls} { justify-items: start; }`;
2801
- if (cls === "justify-items-end") return `.${cls} { justify-items: end; }`;
2802
- if (cls === "justify-items-center") return `.${cls} { justify-items: center; }`;
2803
- if (cls === "justify-items-stretch") return `.${cls} { justify-items: stretch; }`;
2804
- if (cls === "justify-self-auto") return `.${cls} { justify-self: auto; }`;
2805
- if (cls === "justify-self-start") return `.${cls} { justify-self: start; }`;
2806
- if (cls === "justify-self-end") return `.${cls} { justify-self: end; }`;
2807
- if (cls === "justify-self-center") return `.${cls} { justify-self: center; }`;
2808
- if (cls === "justify-self-stretch") return `.${cls} { justify-self: stretch; }`;
2809
- if (cls === "content-normal") return `.${cls} { align-content: normal; }`;
2810
- if (cls === "content-center") return `.${cls} { align-content: center; }`;
2811
- if (cls === "content-start") return `.${cls} { align-content: flex-start; }`;
2812
- if (cls === "content-end") return `.${cls} { align-content: flex-end; }`;
2813
- if (cls === "content-between") return `.${cls} { align-content: space-between; }`;
2814
- if (cls === "content-around") return `.${cls} { align-content: space-around; }`;
2815
- if (cls === "content-evenly") return `.${cls} { align-content: space-evenly; }`;
2816
- if (cls === "content-stretch") return `.${cls} { align-content: stretch; }`;
2817
- if (cls === "content-baseline") return `.${cls} { align-content: baseline; }`;
2893
+ if (posMap[cls]) return `.${escapeSelector(cls)} { ${posMap[cls]} }`;
2894
+ if (cls === "flex-row") return `.${escapeSelector(cls)} { flex-direction: row; }`;
2895
+ if (cls === "flex-row-reverse") return `.${escapeSelector(cls)} { flex-direction: row-reverse; }`;
2896
+ if (cls === "flex-col") return `.${escapeSelector(cls)} { flex-direction: column; }`;
2897
+ if (cls === "flex-col-reverse") return `.${escapeSelector(cls)} { flex-direction: column-reverse; }`;
2898
+ if (cls === "flex-wrap") return `.${escapeSelector(cls)} { flex-wrap: wrap; }`;
2899
+ if (cls === "flex-nowrap") return `.${escapeSelector(cls)} { flex-wrap: nowrap; }`;
2900
+ if (cls === "flex-wrap-reverse") return `.${escapeSelector(cls)} { flex-wrap: wrap-reverse; }`;
2901
+ if (cls === "flex-1") return `.${escapeSelector(cls)} { flex: 1 1 0%; }`;
2902
+ if (cls === "flex-auto") return `.${escapeSelector(cls)} { flex: 1 1 auto; }`;
2903
+ if (cls === "flex-initial") return `.${escapeSelector(cls)} { flex: 0 1 auto; }`;
2904
+ if (cls === "flex-none") return `.${escapeSelector(cls)} { flex: none; }`;
2905
+ if (cls === "flex-grow") return `.${escapeSelector(cls)} { flex-grow: 1; }`;
2906
+ if (cls === "flex-grow-0") return `.${escapeSelector(cls)} { flex-grow: 0; }`;
2907
+ if (cls === "flex-shrink") return `.${escapeSelector(cls)} { flex-shrink: 1; }`;
2908
+ if (cls === "flex-shrink-0") return `.${escapeSelector(cls)} { flex-shrink: 0; }`;
2909
+ if (cls === "grow") return `.${escapeSelector(cls)} { flex-grow: 1; }`;
2910
+ if (cls === "grow-0") return `.${escapeSelector(cls)} { flex-grow: 0; }`;
2911
+ if (cls === "shrink") return `.${escapeSelector(cls)} { flex-shrink: 1; }`;
2912
+ if (cls === "shrink-0") return `.${escapeSelector(cls)} { flex-shrink: 0; }`;
2913
+ if (cls === "items-start") return `.${escapeSelector(cls)} { align-items: flex-start; }`;
2914
+ if (cls === "items-end") return `.${escapeSelector(cls)} { align-items: flex-end; }`;
2915
+ if (cls === "items-center") return `.${escapeSelector(cls)} { align-items: center; }`;
2916
+ if (cls === "items-baseline") return `.${escapeSelector(cls)} { align-items: baseline; }`;
2917
+ if (cls === "items-stretch") return `.${escapeSelector(cls)} { align-items: stretch; }`;
2918
+ if (cls === "self-auto") return `.${escapeSelector(cls)} { align-self: auto; }`;
2919
+ if (cls === "self-start") return `.${escapeSelector(cls)} { align-self: flex-start; }`;
2920
+ if (cls === "self-end") return `.${escapeSelector(cls)} { align-self: flex-end; }`;
2921
+ if (cls === "self-center") return `.${escapeSelector(cls)} { align-self: center; }`;
2922
+ if (cls === "self-stretch") return `.${escapeSelector(cls)} { align-self: stretch; }`;
2923
+ if (cls === "self-baseline") return `.${escapeSelector(cls)} { align-self: baseline; }`;
2924
+ if (cls === "justify-start") return `.${escapeSelector(cls)} { justify-content: flex-start; }`;
2925
+ if (cls === "justify-end") return `.${escapeSelector(cls)} { justify-content: flex-end; }`;
2926
+ if (cls === "justify-center") return `.${escapeSelector(cls)} { justify-content: center; }`;
2927
+ if (cls === "justify-between") return `.${escapeSelector(cls)} { justify-content: space-between; }`;
2928
+ if (cls === "justify-around") return `.${escapeSelector(cls)} { justify-content: space-around; }`;
2929
+ if (cls === "justify-evenly") return `.${escapeSelector(cls)} { justify-content: space-evenly; }`;
2930
+ if (cls === "justify-stretch") return `.${escapeSelector(cls)} { justify-content: stretch; }`;
2931
+ if (cls === "justify-items-start") return `.${escapeSelector(cls)} { justify-items: start; }`;
2932
+ if (cls === "justify-items-end") return `.${escapeSelector(cls)} { justify-items: end; }`;
2933
+ if (cls === "justify-items-center") return `.${escapeSelector(cls)} { justify-items: center; }`;
2934
+ if (cls === "justify-items-stretch") return `.${escapeSelector(cls)} { justify-items: stretch; }`;
2935
+ if (cls === "justify-self-auto") return `.${escapeSelector(cls)} { justify-self: auto; }`;
2936
+ if (cls === "justify-self-start") return `.${escapeSelector(cls)} { justify-self: start; }`;
2937
+ if (cls === "justify-self-end") return `.${escapeSelector(cls)} { justify-self: end; }`;
2938
+ if (cls === "justify-self-center") return `.${escapeSelector(cls)} { justify-self: center; }`;
2939
+ if (cls === "justify-self-stretch") return `.${escapeSelector(cls)} { justify-self: stretch; }`;
2940
+ if (cls === "content-normal") return `.${escapeSelector(cls)} { align-content: normal; }`;
2941
+ if (cls === "content-center") return `.${escapeSelector(cls)} { align-content: center; }`;
2942
+ if (cls === "content-start") return `.${escapeSelector(cls)} { align-content: flex-start; }`;
2943
+ if (cls === "content-end") return `.${escapeSelector(cls)} { align-content: flex-end; }`;
2944
+ if (cls === "content-between") return `.${escapeSelector(cls)} { align-content: space-between; }`;
2945
+ if (cls === "content-around") return `.${escapeSelector(cls)} { align-content: space-around; }`;
2946
+ if (cls === "content-evenly") return `.${escapeSelector(cls)} { align-content: space-evenly; }`;
2947
+ if (cls === "content-stretch") return `.${escapeSelector(cls)} { align-content: stretch; }`;
2948
+ if (cls === "content-baseline") return `.${escapeSelector(cls)} { align-content: baseline; }`;
2818
2949
  const gridColsMatch = cls.match(/^grid-cols-(\d+)$/);
2819
2950
  if (gridColsMatch) {
2820
2951
  const n = parseInt(gridColsMatch[1]);
2821
- return `.${cls} { grid-template-columns: repeat(${n}, minmax(0, 1fr)); }`;
2952
+ return `.${escapeSelector(cls)} { grid-template-columns: repeat(${n}, minmax(0, 1fr)); }`;
2822
2953
  }
2823
- if (cls === "grid-cols-none") return `.${cls} { grid-template-columns: none; }`;
2954
+ if (cls === "grid-cols-none") return `.${escapeSelector(cls)} { grid-template-columns: none; }`;
2824
2955
  const gridRowsMatch = cls.match(/^grid-rows-(\d+)$/);
2825
2956
  if (gridRowsMatch) {
2826
2957
  const n = parseInt(gridRowsMatch[1]);
2827
- return `.${cls} { grid-template-rows: repeat(${n}, minmax(0, 1fr)); }`;
2958
+ return `.${escapeSelector(cls)} { grid-template-rows: repeat(${n}, minmax(0, 1fr)); }`;
2828
2959
  }
2829
- if (cls === "grid-rows-none") return `.${cls} { grid-template-rows: none; }`;
2960
+ if (cls === "grid-rows-none") return `.${escapeSelector(cls)} { grid-template-rows: none; }`;
2830
2961
  const colSpanMatch = cls.match(/^col-span-(\d+)$/);
2831
- if (colSpanMatch) return `.${cls} { grid-column: span ${colSpanMatch[1]} / span ${colSpanMatch[1]}; }`;
2832
- if (cls === "col-span-full") return `.${cls} { grid-column: 1 / -1; }`;
2833
- if (cls === "col-auto") return `.${cls} { grid-column: auto; }`;
2962
+ if (colSpanMatch) return `.${escapeSelector(cls)} { grid-column: span ${colSpanMatch[1]} / span ${colSpanMatch[1]}; }`;
2963
+ if (cls === "col-span-full") return `.${escapeSelector(cls)} { grid-column: 1 / -1; }`;
2964
+ if (cls === "col-auto") return `.${escapeSelector(cls)} { grid-column: auto; }`;
2834
2965
  const rowSpanMatch = cls.match(/^row-span-(\d+)$/);
2835
- if (rowSpanMatch) return `.${cls} { grid-row: span ${rowSpanMatch[1]} / span ${rowSpanMatch[1]}; }`;
2836
- if (cls === "row-span-full") return `.${cls} { grid-row: 1 / -1; }`;
2837
- if (cls === "row-auto") return `.${cls} { grid-row: auto; }`;
2966
+ if (rowSpanMatch) return `.${escapeSelector(cls)} { grid-row: span ${rowSpanMatch[1]} / span ${rowSpanMatch[1]}; }`;
2967
+ if (cls === "row-span-full") return `.${escapeSelector(cls)} { grid-row: 1 / -1; }`;
2968
+ if (cls === "row-auto") return `.${escapeSelector(cls)} { grid-row: auto; }`;
2838
2969
  const colStartMatch = cls.match(/^col-start-(\d+)$/);
2839
- if (colStartMatch) return `.${cls} { grid-column-start: ${colStartMatch[1]}; }`;
2970
+ if (colStartMatch) return `.${escapeSelector(cls)} { grid-column-start: ${colStartMatch[1]}; }`;
2840
2971
  const colEndMatch = cls.match(/^col-end-(\d+)$/);
2841
- if (colEndMatch) return `.${cls} { grid-column-end: ${colEndMatch[1]}; }`;
2972
+ if (colEndMatch) return `.${escapeSelector(cls)} { grid-column-end: ${colEndMatch[1]}; }`;
2842
2973
  const rowStartMatch = cls.match(/^row-start-(\d+)$/);
2843
- if (rowStartMatch) return `.${cls} { grid-row-start: ${rowStartMatch[1]}; }`;
2974
+ if (rowStartMatch) return `.${escapeSelector(cls)} { grid-row-start: ${rowStartMatch[1]}; }`;
2844
2975
  const rowEndMatch = cls.match(/^row-end-(\d+)$/);
2845
- if (rowEndMatch) return `.${cls} { grid-row-end: ${rowEndMatch[1]}; }`;
2976
+ if (rowEndMatch) return `.${escapeSelector(cls)} { grid-row-end: ${rowEndMatch[1]}; }`;
2846
2977
  const orderMatch = cls.match(/^order-(-?\d+)$/);
2847
- if (orderMatch) return `.${cls} { order: ${orderMatch[1]}; }`;
2848
- if (cls === "order-first") return `.${cls} { order: -9999; }`;
2849
- if (cls === "order-last") return `.${cls} { order: 9999; }`;
2850
- if (cls === "order-none") return `.${cls} { order: 0; }`;
2851
- if (cls === "float-right") return `.${cls} { float: right; }`;
2852
- if (cls === "float-left") return `.${cls} { float: left; }`;
2853
- if (cls === "float-none") return `.${cls} { float: none; }`;
2978
+ if (orderMatch) return `.${escapeSelector(cls)} { order: ${orderMatch[1]}; }`;
2979
+ if (cls === "order-first") return `.${escapeSelector(cls)} { order: -9999; }`;
2980
+ if (cls === "order-last") return `.${escapeSelector(cls)} { order: 9999; }`;
2981
+ if (cls === "order-none") return `.${escapeSelector(cls)} { order: 0; }`;
2982
+ if (cls === "float-right") return `.${escapeSelector(cls)} { float: right; }`;
2983
+ if (cls === "float-left") return `.${escapeSelector(cls)} { float: left; }`;
2984
+ if (cls === "float-none") return `.${escapeSelector(cls)} { float: none; }`;
2854
2985
  if (cls === "clearfix") return `.${cls}::after { content: ""; display: table; clear: both; }`;
2855
- if (cls === "overflow-auto") return `.${cls} { overflow: auto; }`;
2856
- if (cls === "overflow-hidden") return `.${cls} { overflow: hidden; }`;
2857
- if (cls === "overflow-clip") return `.${cls} { overflow: clip; }`;
2858
- if (cls === "overflow-visible") return `.${cls} { overflow: visible; }`;
2859
- if (cls === "overflow-scroll") return `.${cls} { overflow: scroll; }`;
2860
- if (cls === "overflow-x-auto") return `.${cls} { overflow-x: auto; }`;
2861
- if (cls === "overflow-x-hidden") return `.${cls} { overflow-x: hidden; }`;
2862
- if (cls === "overflow-x-scroll") return `.${cls} { overflow-x: scroll; }`;
2863
- if (cls === "overflow-y-auto") return `.${cls} { overflow-y: auto; }`;
2864
- if (cls === "overflow-y-hidden") return `.${cls} { overflow-y: hidden; }`;
2865
- if (cls === "overflow-y-scroll") return `.${cls} { overflow-y: scroll; }`;
2866
- if (cls === "visible") return `.${cls} { visibility: visible; }`;
2867
- if (cls === "invisible") return `.${cls} { visibility: hidden; }`;
2868
- if (cls === "collapse") return `.${cls} { visibility: collapse; }`;
2869
- if (cls === "pointer-events-none") return `.${cls} { pointer-events: none; }`;
2870
- if (cls === "pointer-events-auto") return `.${cls} { pointer-events: auto; }`;
2986
+ if (cls === "overflow-auto") return `.${escapeSelector(cls)} { overflow: auto; }`;
2987
+ if (cls === "overflow-hidden") return `.${escapeSelector(cls)} { overflow: hidden; }`;
2988
+ if (cls === "overflow-clip") return `.${escapeSelector(cls)} { overflow: clip; }`;
2989
+ if (cls === "overflow-visible") return `.${escapeSelector(cls)} { overflow: visible; }`;
2990
+ if (cls === "overflow-scroll") return `.${escapeSelector(cls)} { overflow: scroll; }`;
2991
+ if (cls === "overflow-x-auto") return `.${escapeSelector(cls)} { overflow-x: auto; }`;
2992
+ if (cls === "overflow-x-hidden") return `.${escapeSelector(cls)} { overflow-x: hidden; }`;
2993
+ if (cls === "overflow-x-scroll") return `.${escapeSelector(cls)} { overflow-x: scroll; }`;
2994
+ if (cls === "overflow-y-auto") return `.${escapeSelector(cls)} { overflow-y: auto; }`;
2995
+ if (cls === "overflow-y-hidden") return `.${escapeSelector(cls)} { overflow-y: hidden; }`;
2996
+ if (cls === "overflow-y-scroll") return `.${escapeSelector(cls)} { overflow-y: scroll; }`;
2997
+ if (cls === "visible") return `.${escapeSelector(cls)} { visibility: visible; }`;
2998
+ if (cls === "invisible") return `.${escapeSelector(cls)} { visibility: hidden; }`;
2999
+ if (cls === "collapse") return `.${escapeSelector(cls)} { visibility: collapse; }`;
3000
+ if (cls === "pointer-events-none") return `.${escapeSelector(cls)} { pointer-events: none; }`;
3001
+ if (cls === "pointer-events-auto") return `.${escapeSelector(cls)} { pointer-events: auto; }`;
2871
3002
  const cursorMap = {
2872
3003
  "cursor-auto": "auto",
2873
3004
  "cursor-default": "default",
@@ -2884,30 +3015,30 @@ function matchLayout(cls) {
2884
3015
  "cursor-zoom-in": "zoom-in",
2885
3016
  "cursor-zoom-out": "zoom-out"
2886
3017
  };
2887
- if (cursorMap[cls]) return `.${cls} { cursor: ${cursorMap[cls]}; }`;
2888
- if (cls === "select-none") return `.${cls} { user-select: none; }`;
2889
- if (cls === "select-text") return `.${cls} { user-select: text; }`;
2890
- if (cls === "select-all") return `.${cls} { user-select: all; }`;
2891
- if (cls === "select-auto") return `.${cls} { user-select: auto; }`;
2892
- if (cls === "object-contain") return `.${cls} { object-fit: contain; }`;
2893
- if (cls === "object-cover") return `.${cls} { object-fit: cover; }`;
2894
- if (cls === "object-fill") return `.${cls} { object-fit: fill; }`;
2895
- if (cls === "object-none") return `.${cls} { object-fit: none; }`;
2896
- if (cls === "object-scale-down") return `.${cls} { object-fit: scale-down; }`;
2897
- if (cls === "aspect-auto") return `.${cls} { aspect-ratio: auto; }`;
2898
- if (cls === "aspect-square") return `.${cls} { aspect-ratio: 1 / 1; }`;
2899
- if (cls === "aspect-video") return `.${cls} { aspect-ratio: 16 / 9; }`;
3018
+ if (cursorMap[cls]) return `.${escapeSelector(cls)} { cursor: ${cursorMap[cls]}; }`;
3019
+ if (cls === "select-none") return `.${escapeSelector(cls)} { user-select: none; }`;
3020
+ if (cls === "select-text") return `.${escapeSelector(cls)} { user-select: text; }`;
3021
+ if (cls === "select-all") return `.${escapeSelector(cls)} { user-select: all; }`;
3022
+ if (cls === "select-auto") return `.${escapeSelector(cls)} { user-select: auto; }`;
3023
+ if (cls === "object-contain") return `.${escapeSelector(cls)} { object-fit: contain; }`;
3024
+ if (cls === "object-cover") return `.${escapeSelector(cls)} { object-fit: cover; }`;
3025
+ if (cls === "object-fill") return `.${escapeSelector(cls)} { object-fit: fill; }`;
3026
+ if (cls === "object-none") return `.${escapeSelector(cls)} { object-fit: none; }`;
3027
+ if (cls === "object-scale-down") return `.${escapeSelector(cls)} { object-fit: scale-down; }`;
3028
+ if (cls === "aspect-auto") return `.${escapeSelector(cls)} { aspect-ratio: auto; }`;
3029
+ if (cls === "aspect-square") return `.${escapeSelector(cls)} { aspect-ratio: 1 / 1; }`;
3030
+ if (cls === "aspect-video") return `.${escapeSelector(cls)} { aspect-ratio: 16 / 9; }`;
2900
3031
  if (cls === "container") {
2901
- return `.${cls} {
3032
+ return `.${escapeSelector(cls)} {
2902
3033
  width: 100%;
2903
3034
  margin-left: auto;
2904
3035
  margin-right: auto;
2905
3036
  }`;
2906
3037
  }
2907
- if (cls === "box-border") return `.${cls} { box-sizing: border-box; }`;
2908
- if (cls === "box-content") return `.${cls} { box-sizing: content-box; }`;
2909
- if (cls === "isolate") return `.${cls} { isolation: isolate; }`;
2910
- if (cls === "isolation-auto") return `.${cls} { isolation: auto; }`;
3038
+ if (cls === "box-border") return `.${escapeSelector(cls)} { box-sizing: border-box; }`;
3039
+ if (cls === "box-content") return `.${escapeSelector(cls)} { box-sizing: content-box; }`;
3040
+ if (cls === "isolate") return `.${escapeSelector(cls)} { isolation: isolate; }`;
3041
+ if (cls === "isolation-auto") return `.${escapeSelector(cls)} { isolation: auto; }`;
2911
3042
  const mixBlendMap = {
2912
3043
  "mix-blend-normal": "normal",
2913
3044
  "mix-blend-multiply": "multiply",
@@ -2922,40 +3053,40 @@ function matchLayout(cls) {
2922
3053
  "mix-blend-difference": "difference",
2923
3054
  "mix-blend-exclusion": "exclusion"
2924
3055
  };
2925
- if (mixBlendMap[cls]) return `.${cls} { mix-blend-mode: ${mixBlendMap[cls]}; }`;
2926
- if (cls === "bg-auto") return `.${cls} { background-size: auto; }`;
2927
- if (cls === "bg-cover") return `.${cls} { background-size: cover; }`;
2928
- if (cls === "bg-contain") return `.${cls} { background-size: contain; }`;
2929
- if (cls === "bg-center") return `.${cls} { background-position: center; }`;
2930
- if (cls === "bg-top") return `.${cls} { background-position: top; }`;
2931
- if (cls === "bg-bottom") return `.${cls} { background-position: bottom; }`;
2932
- if (cls === "bg-left") return `.${cls} { background-position: left; }`;
2933
- if (cls === "bg-right") return `.${cls} { background-position: right; }`;
2934
- if (cls === "bg-left-top") return `.${cls} { background-position: left top; }`;
2935
- if (cls === "bg-left-bottom") return `.${cls} { background-position: left bottom; }`;
2936
- if (cls === "bg-right-top") return `.${cls} { background-position: right top; }`;
2937
- if (cls === "bg-right-bottom") return `.${cls} { background-position: right bottom; }`;
2938
- if (cls === "bg-repeat") return `.${cls} { background-repeat: repeat; }`;
2939
- if (cls === "bg-no-repeat") return `.${cls} { background-repeat: no-repeat; }`;
2940
- if (cls === "bg-repeat-x") return `.${cls} { background-repeat: repeat-x; }`;
2941
- if (cls === "bg-repeat-y") return `.${cls} { background-repeat: repeat-y; }`;
2942
- if (cls === "bg-repeat-round") return `.${cls} { background-repeat: round; }`;
2943
- if (cls === "bg-repeat-space") return `.${cls} { background-repeat: space; }`;
2944
- if (cls === "bg-fixed") return `.${cls} { background-attachment: fixed; }`;
2945
- if (cls === "bg-local") return `.${cls} { background-attachment: local; }`;
2946
- if (cls === "bg-scroll") return `.${cls} { background-attachment: scroll; }`;
2947
- if (cls === "bg-origin-border") return `.${cls} { background-origin: border-box; }`;
2948
- if (cls === "bg-origin-padding") return `.${cls} { background-origin: padding-box; }`;
2949
- if (cls === "bg-origin-content") return `.${cls} { background-origin: content-box; }`;
2950
- if (cls === "bg-clip-border") return `.${cls} { background-clip: border-box; }`;
2951
- if (cls === "bg-clip-padding") return `.${cls} { background-clip: padding-box; }`;
2952
- if (cls === "bg-clip-content") return `.${cls} { background-clip: content-box; }`;
2953
- if (cls === "bg-clip-text") return `.${cls} { background-clip: text; -webkit-background-clip: text; }`;
3056
+ if (mixBlendMap[cls]) return `.${escapeSelector(cls)} { mix-blend-mode: ${mixBlendMap[cls]}; }`;
3057
+ if (cls === "bg-auto") return `.${escapeSelector(cls)} { background-size: auto; }`;
3058
+ if (cls === "bg-cover") return `.${escapeSelector(cls)} { background-size: cover; }`;
3059
+ if (cls === "bg-contain") return `.${escapeSelector(cls)} { background-size: contain; }`;
3060
+ if (cls === "bg-center") return `.${escapeSelector(cls)} { background-position: center; }`;
3061
+ if (cls === "bg-top") return `.${escapeSelector(cls)} { background-position: top; }`;
3062
+ if (cls === "bg-bottom") return `.${escapeSelector(cls)} { background-position: bottom; }`;
3063
+ if (cls === "bg-left") return `.${escapeSelector(cls)} { background-position: left; }`;
3064
+ if (cls === "bg-right") return `.${escapeSelector(cls)} { background-position: right; }`;
3065
+ if (cls === "bg-left-top") return `.${escapeSelector(cls)} { background-position: left top; }`;
3066
+ if (cls === "bg-left-bottom") return `.${escapeSelector(cls)} { background-position: left bottom; }`;
3067
+ if (cls === "bg-right-top") return `.${escapeSelector(cls)} { background-position: right top; }`;
3068
+ if (cls === "bg-right-bottom") return `.${escapeSelector(cls)} { background-position: right bottom; }`;
3069
+ if (cls === "bg-repeat") return `.${escapeSelector(cls)} { background-repeat: repeat; }`;
3070
+ if (cls === "bg-no-repeat") return `.${escapeSelector(cls)} { background-repeat: no-repeat; }`;
3071
+ if (cls === "bg-repeat-x") return `.${escapeSelector(cls)} { background-repeat: repeat-x; }`;
3072
+ if (cls === "bg-repeat-y") return `.${escapeSelector(cls)} { background-repeat: repeat-y; }`;
3073
+ if (cls === "bg-repeat-round") return `.${escapeSelector(cls)} { background-repeat: round; }`;
3074
+ if (cls === "bg-repeat-space") return `.${escapeSelector(cls)} { background-repeat: space; }`;
3075
+ if (cls === "bg-fixed") return `.${escapeSelector(cls)} { background-attachment: fixed; }`;
3076
+ if (cls === "bg-local") return `.${escapeSelector(cls)} { background-attachment: local; }`;
3077
+ if (cls === "bg-scroll") return `.${escapeSelector(cls)} { background-attachment: scroll; }`;
3078
+ if (cls === "bg-origin-border") return `.${escapeSelector(cls)} { background-origin: border-box; }`;
3079
+ if (cls === "bg-origin-padding") return `.${escapeSelector(cls)} { background-origin: padding-box; }`;
3080
+ if (cls === "bg-origin-content") return `.${escapeSelector(cls)} { background-origin: content-box; }`;
3081
+ if (cls === "bg-clip-border") return `.${escapeSelector(cls)} { background-clip: border-box; }`;
3082
+ if (cls === "bg-clip-padding") return `.${escapeSelector(cls)} { background-clip: padding-box; }`;
3083
+ if (cls === "bg-clip-content") return `.${escapeSelector(cls)} { background-clip: content-box; }`;
3084
+ if (cls === "bg-clip-text") return `.${escapeSelector(cls)} { background-clip: text; -webkit-background-clip: text; }`;
2954
3085
  return null;
2955
3086
  }
2956
3087
 
2957
3088
  // src/generator/sizing.ts
2958
- function has3(obj, key) {
3089
+ function has2(obj, key) {
2959
3090
  return typeof obj[key] === "string";
2960
3091
  }
2961
3092
  function generateSizing(classes, config) {
@@ -2999,25 +3130,25 @@ function matchSizing(cls, spacing) {
2999
3130
  const wMatch = cls.match(/^w-(.+)$/);
3000
3131
  if (wMatch) {
3001
3132
  const key = wMatch[1];
3002
- if (key === "auto") return `.${cls} { width: auto; }`;
3003
- if (key === "full") return `.${cls} { width: 100%; }`;
3004
- if (key === "screen") return `.${cls} { width: 100vw; }`;
3005
- if (key === "svw") return `.${cls} { width: 100svw; }`;
3006
- if (key === "min") return `.${cls} { width: min-content; }`;
3007
- if (key === "max") return `.${cls} { width: max-content; }`;
3008
- if (key === "fit") return `.${cls} { width: fit-content; }`;
3009
- if (has3(fractions, key)) return `.${cls} { width: ${fractions[key]}; }`;
3010
- if (has3(spacing, key)) return `.${cls} { width: ${spacing[key]}; }`;
3133
+ if (key === "auto") return `.${escapeSelector(cls)} { width: auto; }`;
3134
+ if (key === "full") return `.${escapeSelector(cls)} { width: 100%; }`;
3135
+ if (key === "screen") return `.${escapeSelector(cls)} { width: 100vw; }`;
3136
+ if (key === "svw") return `.${escapeSelector(cls)} { width: 100svw; }`;
3137
+ if (key === "min") return `.${escapeSelector(cls)} { width: min-content; }`;
3138
+ if (key === "max") return `.${escapeSelector(cls)} { width: max-content; }`;
3139
+ if (key === "fit") return `.${escapeSelector(cls)} { width: fit-content; }`;
3140
+ if (has2(fractions, key)) return `.${escapeSelector(cls)} { width: ${fractions[key]}; }`;
3141
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { width: ${spacing[key]}; }`;
3011
3142
  }
3012
3143
  const minWMatch = cls.match(/^min-w-(.+)$/);
3013
3144
  if (minWMatch) {
3014
3145
  const key = minWMatch[1];
3015
- if (key === "0") return `.${cls} { min-width: 0px; }`;
3016
- if (key === "full") return `.${cls} { min-width: 100%; }`;
3017
- if (key === "min") return `.${cls} { min-width: min-content; }`;
3018
- if (key === "max") return `.${cls} { min-width: max-content; }`;
3019
- if (key === "fit") return `.${cls} { min-width: fit-content; }`;
3020
- if (has3(spacing, key)) return `.${cls} { min-width: ${spacing[key]}; }`;
3146
+ if (key === "0") return `.${escapeSelector(cls)} { min-width: 0px; }`;
3147
+ if (key === "full") return `.${escapeSelector(cls)} { min-width: 100%; }`;
3148
+ if (key === "min") return `.${escapeSelector(cls)} { min-width: min-content; }`;
3149
+ if (key === "max") return `.${escapeSelector(cls)} { min-width: max-content; }`;
3150
+ if (key === "fit") return `.${escapeSelector(cls)} { min-width: fit-content; }`;
3151
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { min-width: ${spacing[key]}; }`;
3021
3152
  }
3022
3153
  const maxWMap = {
3023
3154
  none: "none",
@@ -3044,59 +3175,59 @@ function matchSizing(cls, spacing) {
3044
3175
  "screen-2xl": "1536px"
3045
3176
  };
3046
3177
  const maxWMatch = cls.match(/^max-w-(.+)$/);
3047
- if (maxWMatch && has3(maxWMap, maxWMatch[1])) {
3048
- return `.${cls} { max-width: ${maxWMap[maxWMatch[1]]}; }`;
3178
+ if (maxWMatch && has2(maxWMap, maxWMatch[1])) {
3179
+ return `.${escapeSelector(cls)} { max-width: ${maxWMap[maxWMatch[1]]}; }`;
3049
3180
  }
3050
3181
  const hMatch = cls.match(/^h-(.+)$/);
3051
3182
  if (hMatch) {
3052
3183
  const key = hMatch[1];
3053
- if (key === "auto") return `.${cls} { height: auto; }`;
3054
- if (key === "full") return `.${cls} { height: 100%; }`;
3055
- if (key === "screen") return `.${cls} { height: 100vh; }`;
3056
- if (key === "svh") return `.${cls} { height: 100svh; }`;
3057
- if (key === "dvh") return `.${cls} { height: 100dvh; }`;
3058
- if (key === "min") return `.${cls} { height: min-content; }`;
3059
- if (key === "max") return `.${cls} { height: max-content; }`;
3060
- if (key === "fit") return `.${cls} { height: fit-content; }`;
3061
- if (has3(fractions, key)) return `.${cls} { height: ${fractions[key]}; }`;
3062
- if (has3(spacing, key)) return `.${cls} { height: ${spacing[key]}; }`;
3184
+ if (key === "auto") return `.${escapeSelector(cls)} { height: auto; }`;
3185
+ if (key === "full") return `.${escapeSelector(cls)} { height: 100%; }`;
3186
+ if (key === "screen") return `.${escapeSelector(cls)} { height: 100vh; }`;
3187
+ if (key === "svh") return `.${escapeSelector(cls)} { height: 100svh; }`;
3188
+ if (key === "dvh") return `.${escapeSelector(cls)} { height: 100dvh; }`;
3189
+ if (key === "min") return `.${escapeSelector(cls)} { height: min-content; }`;
3190
+ if (key === "max") return `.${escapeSelector(cls)} { height: max-content; }`;
3191
+ if (key === "fit") return `.${escapeSelector(cls)} { height: fit-content; }`;
3192
+ if (has2(fractions, key)) return `.${escapeSelector(cls)} { height: ${fractions[key]}; }`;
3193
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { height: ${spacing[key]}; }`;
3063
3194
  }
3064
3195
  const minHMatch = cls.match(/^min-h-(.+)$/);
3065
3196
  if (minHMatch) {
3066
3197
  const key = minHMatch[1];
3067
- if (key === "0") return `.${cls} { min-height: 0px; }`;
3068
- if (key === "full") return `.${cls} { min-height: 100%; }`;
3069
- if (key === "screen") return `.${cls} { min-height: 100vh; }`;
3070
- if (key === "svh") return `.${cls} { min-height: 100svh; }`;
3071
- if (key === "dvh") return `.${cls} { min-height: 100dvh; }`;
3072
- if (key === "fit") return `.${cls} { min-height: fit-content; }`;
3073
- if (has3(spacing, key)) return `.${cls} { min-height: ${spacing[key]}; }`;
3198
+ if (key === "0") return `.${escapeSelector(cls)} { min-height: 0px; }`;
3199
+ if (key === "full") return `.${escapeSelector(cls)} { min-height: 100%; }`;
3200
+ if (key === "screen") return `.${escapeSelector(cls)} { min-height: 100vh; }`;
3201
+ if (key === "svh") return `.${escapeSelector(cls)} { min-height: 100svh; }`;
3202
+ if (key === "dvh") return `.${escapeSelector(cls)} { min-height: 100dvh; }`;
3203
+ if (key === "fit") return `.${escapeSelector(cls)} { min-height: fit-content; }`;
3204
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { min-height: ${spacing[key]}; }`;
3074
3205
  }
3075
3206
  const maxHMatch = cls.match(/^max-h-(.+)$/);
3076
3207
  if (maxHMatch) {
3077
3208
  const key = maxHMatch[1];
3078
- if (key === "none") return `.${cls} { max-height: none; }`;
3079
- if (key === "full") return `.${cls} { max-height: 100%; }`;
3080
- if (key === "screen") return `.${cls} { max-height: 100vh; }`;
3081
- if (key === "svh") return `.${cls} { max-height: 100svh; }`;
3082
- if (key === "dvh") return `.${cls} { max-height: 100dvh; }`;
3083
- if (key === "fit") return `.${cls} { max-height: fit-content; }`;
3084
- if (has3(spacing, key)) return `.${cls} { max-height: ${spacing[key]}; }`;
3209
+ if (key === "none") return `.${escapeSelector(cls)} { max-height: none; }`;
3210
+ if (key === "full") return `.${escapeSelector(cls)} { max-height: 100%; }`;
3211
+ if (key === "screen") return `.${escapeSelector(cls)} { max-height: 100vh; }`;
3212
+ if (key === "svh") return `.${escapeSelector(cls)} { max-height: 100svh; }`;
3213
+ if (key === "dvh") return `.${escapeSelector(cls)} { max-height: 100dvh; }`;
3214
+ if (key === "fit") return `.${escapeSelector(cls)} { max-height: fit-content; }`;
3215
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { max-height: ${spacing[key]}; }`;
3085
3216
  }
3086
3217
  const basisMatch = cls.match(/^basis-(.+)$/);
3087
3218
  if (basisMatch) {
3088
3219
  const key = basisMatch[1];
3089
- if (key === "auto") return `.${cls} { flex-basis: auto; }`;
3090
- if (key === "full") return `.${cls} { flex-basis: 100%; }`;
3091
- if (key === "0") return `.${cls} { flex-basis: 0px; }`;
3092
- if (has3(fractions, key)) return `.${cls} { flex-basis: ${fractions[key]}; }`;
3093
- if (has3(spacing, key)) return `.${cls} { flex-basis: ${spacing[key]}; }`;
3220
+ if (key === "auto") return `.${escapeSelector(cls)} { flex-basis: auto; }`;
3221
+ if (key === "full") return `.${escapeSelector(cls)} { flex-basis: 100%; }`;
3222
+ if (key === "0") return `.${escapeSelector(cls)} { flex-basis: 0px; }`;
3223
+ if (has2(fractions, key)) return `.${escapeSelector(cls)} { flex-basis: ${fractions[key]}; }`;
3224
+ if (has2(spacing, key)) return `.${escapeSelector(cls)} { flex-basis: ${spacing[key]}; }`;
3094
3225
  }
3095
3226
  return null;
3096
3227
  }
3097
3228
 
3098
3229
  // src/generator/effects.ts
3099
- function has4(obj, key) {
3230
+ function has3(obj, key) {
3100
3231
  return typeof obj[key] === "string";
3101
3232
  }
3102
3233
  function generateEffects(classes, config) {
@@ -3110,8 +3241,8 @@ function generateEffects(classes, config) {
3110
3241
  }
3111
3242
  function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3112
3243
  const opacityMatch = cls.match(/^opacity-(.+)$/);
3113
- if (opacityMatch && has4(opacity, opacityMatch[1])) {
3114
- return `.${cls} {
3244
+ if (opacityMatch && has3(opacity, opacityMatch[1])) {
3245
+ return `.${escapeSelector(cls)} {
3115
3246
  opacity: ${opacity[opacityMatch[1]]};
3116
3247
  transition-property: opacity;
3117
3248
  transition-duration: var(--alive-duration, 0ms);
@@ -3119,87 +3250,87 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3119
3250
  }`;
3120
3251
  }
3121
3252
  const zMatch = cls.match(/^z-(.+)$/);
3122
- if (zMatch && has4(zIndex, zMatch[1])) {
3123
- return `.${cls} { z-index: ${zIndex[zMatch[1]]}; }`;
3253
+ if (zMatch && has3(zIndex, zMatch[1])) {
3254
+ return `.${escapeSelector(cls)} { z-index: ${zIndex[zMatch[1]]}; }`;
3124
3255
  }
3125
3256
  const shadowMatch = cls.match(/^shadow(?:-(.+))?$/);
3126
3257
  if (shadowMatch) {
3127
3258
  const key = shadowMatch[1] ?? "DEFAULT";
3128
- if (has4(boxShadow, key)) {
3129
- return `.${cls} { box-shadow: ${boxShadow[key]}; }`;
3259
+ if (has3(boxShadow, key)) {
3260
+ return `.${escapeSelector(cls)} { box-shadow: ${boxShadow[key]}; }`;
3130
3261
  }
3131
- if (!shadowMatch[1] && has4(boxShadow, "DEFAULT")) {
3132
- return `.${cls} { box-shadow: ${boxShadow["DEFAULT"]}; }`;
3262
+ if (!shadowMatch[1] && has3(boxShadow, "DEFAULT")) {
3263
+ return `.${escapeSelector(cls)} { box-shadow: ${boxShadow["DEFAULT"]}; }`;
3133
3264
  }
3134
3265
  }
3135
3266
  const roundedMatch = cls.match(/^rounded(?:-(.+))?$/);
3136
3267
  if (roundedMatch) {
3137
3268
  const key = roundedMatch[1] ?? "DEFAULT";
3138
- if (has4(borderRadius, key)) return `.${cls} { border-radius: ${borderRadius[key]}; }`;
3139
- if (!roundedMatch[1] && has4(borderRadius, "DEFAULT")) return `.${cls} { border-radius: ${borderRadius["DEFAULT"]}; }`;
3269
+ if (has3(borderRadius, key)) return `.${escapeSelector(cls)} { border-radius: ${borderRadius[key]}; }`;
3270
+ if (!roundedMatch[1] && has3(borderRadius, "DEFAULT")) return `.${escapeSelector(cls)} { border-radius: ${borderRadius["DEFAULT"]}; }`;
3140
3271
  }
3141
3272
  const roundedTMatch = cls.match(/^rounded-t(?:-(.+))?$/);
3142
3273
  if (roundedTMatch) {
3143
3274
  const rkey = roundedTMatch[1] ?? "DEFAULT";
3144
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3145
- if (val) return `.${cls} { border-top-left-radius: ${val}; border-top-right-radius: ${val}; }`;
3275
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3276
+ if (val) return `.${escapeSelector(cls)} { border-top-left-radius: ${val}; border-top-right-radius: ${val}; }`;
3146
3277
  }
3147
3278
  const roundedBMatch = cls.match(/^rounded-b(?:-(.+))?$/);
3148
3279
  if (roundedBMatch) {
3149
3280
  const rkey = roundedBMatch[1] ?? "DEFAULT";
3150
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3151
- if (val) return `.${cls} { border-bottom-left-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3281
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3282
+ if (val) return `.${escapeSelector(cls)} { border-bottom-left-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3152
3283
  }
3153
3284
  const roundedLMatch = cls.match(/^rounded-l(?:-(.+))?$/);
3154
3285
  if (roundedLMatch) {
3155
3286
  const rkey = roundedLMatch[1] ?? "DEFAULT";
3156
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3157
- if (val) return `.${cls} { border-top-left-radius: ${val}; border-bottom-left-radius: ${val}; }`;
3287
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3288
+ if (val) return `.${escapeSelector(cls)} { border-top-left-radius: ${val}; border-bottom-left-radius: ${val}; }`;
3158
3289
  }
3159
3290
  const roundedRMatch = cls.match(/^rounded-r(?:-(.+))?$/);
3160
3291
  if (roundedRMatch) {
3161
3292
  const rkey = roundedRMatch[1] ?? "DEFAULT";
3162
- const val = has4(borderRadius, rkey) ? borderRadius[rkey] : has4(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3163
- if (val) return `.${cls} { border-top-right-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3164
- }
3165
- if (cls === "border") return `.${cls} { border-width: 1px; border-style: solid; }`;
3166
- if (cls === "border-0") return `.${cls} { border-width: 0px; }`;
3167
- if (cls === "border-2") return `.${cls} { border-width: 2px; border-style: solid; }`;
3168
- if (cls === "border-4") return `.${cls} { border-width: 4px; border-style: solid; }`;
3169
- if (cls === "border-8") return `.${cls} { border-width: 8px; border-style: solid; }`;
3170
- if (cls === "border-t") return `.${cls} { border-top-width: 1px; border-top-style: solid; }`;
3171
- if (cls === "border-r") return `.${cls} { border-right-width: 1px; border-right-style: solid; }`;
3172
- if (cls === "border-b") return `.${cls} { border-bottom-width: 1px; border-bottom-style: solid; }`;
3173
- if (cls === "border-l") return `.${cls} { border-left-width: 1px; border-left-style: solid; }`;
3174
- if (cls === "border-t-0") return `.${cls} { border-top-width: 0px; }`;
3175
- if (cls === "border-r-0") return `.${cls} { border-right-width: 0px; }`;
3176
- if (cls === "border-b-0") return `.${cls} { border-bottom-width: 0px; }`;
3177
- if (cls === "border-l-0") return `.${cls} { border-left-width: 0px; }`;
3178
- if (cls === "border-solid") return `.${cls} { border-style: solid; }`;
3179
- if (cls === "border-dashed") return `.${cls} { border-style: dashed; }`;
3180
- if (cls === "border-dotted") return `.${cls} { border-style: dotted; }`;
3181
- if (cls === "border-double") return `.${cls} { border-style: double; }`;
3182
- if (cls === "border-hidden") return `.${cls} { border-style: hidden; }`;
3183
- if (cls === "border-none") return `.${cls} { border-style: none; }`;
3184
- if (cls === "outline-none") return `.${cls} { outline: 2px solid transparent; outline-offset: 2px; }`;
3185
- if (cls === "outline") return `.${cls} { outline-style: solid; }`;
3186
- if (cls === "outline-dashed") return `.${cls} { outline-style: dashed; }`;
3187
- if (cls === "outline-dotted") return `.${cls} { outline-style: dotted; }`;
3188
- if (cls === "outline-double") return `.${cls} { outline-style: double; }`;
3293
+ const val = has3(borderRadius, rkey) ? borderRadius[rkey] : has3(borderRadius, "DEFAULT") ? borderRadius["DEFAULT"] : null;
3294
+ if (val) return `.${escapeSelector(cls)} { border-top-right-radius: ${val}; border-bottom-right-radius: ${val}; }`;
3295
+ }
3296
+ if (cls === "border") return `.${escapeSelector(cls)} { border-width: 1px; border-style: solid; }`;
3297
+ if (cls === "border-0") return `.${escapeSelector(cls)} { border-width: 0px; }`;
3298
+ if (cls === "border-2") return `.${escapeSelector(cls)} { border-width: 2px; border-style: solid; }`;
3299
+ if (cls === "border-4") return `.${escapeSelector(cls)} { border-width: 4px; border-style: solid; }`;
3300
+ if (cls === "border-8") return `.${escapeSelector(cls)} { border-width: 8px; border-style: solid; }`;
3301
+ if (cls === "border-t") return `.${escapeSelector(cls)} { border-top-width: 1px; border-top-style: solid; }`;
3302
+ if (cls === "border-r") return `.${escapeSelector(cls)} { border-right-width: 1px; border-right-style: solid; }`;
3303
+ if (cls === "border-b") return `.${escapeSelector(cls)} { border-bottom-width: 1px; border-bottom-style: solid; }`;
3304
+ if (cls === "border-l") return `.${escapeSelector(cls)} { border-left-width: 1px; border-left-style: solid; }`;
3305
+ if (cls === "border-t-0") return `.${escapeSelector(cls)} { border-top-width: 0px; }`;
3306
+ if (cls === "border-r-0") return `.${escapeSelector(cls)} { border-right-width: 0px; }`;
3307
+ if (cls === "border-b-0") return `.${escapeSelector(cls)} { border-bottom-width: 0px; }`;
3308
+ if (cls === "border-l-0") return `.${escapeSelector(cls)} { border-left-width: 0px; }`;
3309
+ if (cls === "border-solid") return `.${escapeSelector(cls)} { border-style: solid; }`;
3310
+ if (cls === "border-dashed") return `.${escapeSelector(cls)} { border-style: dashed; }`;
3311
+ if (cls === "border-dotted") return `.${escapeSelector(cls)} { border-style: dotted; }`;
3312
+ if (cls === "border-double") return `.${escapeSelector(cls)} { border-style: double; }`;
3313
+ if (cls === "border-hidden") return `.${escapeSelector(cls)} { border-style: hidden; }`;
3314
+ if (cls === "border-none") return `.${escapeSelector(cls)} { border-style: none; }`;
3315
+ if (cls === "outline-none") return `.${escapeSelector(cls)} { outline: 2px solid transparent; outline-offset: 2px; }`;
3316
+ if (cls === "outline") return `.${escapeSelector(cls)} { outline-style: solid; }`;
3317
+ if (cls === "outline-dashed") return `.${escapeSelector(cls)} { outline-style: dashed; }`;
3318
+ if (cls === "outline-dotted") return `.${escapeSelector(cls)} { outline-style: dotted; }`;
3319
+ if (cls === "outline-double") return `.${escapeSelector(cls)} { outline-style: double; }`;
3189
3320
  const outlineWidthMatch = cls.match(/^outline-(\d+)$/);
3190
- if (outlineWidthMatch) return `.${cls} { outline-width: ${outlineWidthMatch[1]}px; }`;
3321
+ if (outlineWidthMatch) return `.${escapeSelector(cls)} { outline-width: ${outlineWidthMatch[1]}px; }`;
3191
3322
  const outlineOffsetMatch = cls.match(/^outline-offset-(\d+)$/);
3192
- if (outlineOffsetMatch) return `.${cls} { outline-offset: ${outlineOffsetMatch[1]}px; }`;
3323
+ if (outlineOffsetMatch) return `.${escapeSelector(cls)} { outline-offset: ${outlineOffsetMatch[1]}px; }`;
3193
3324
  const ringMatch = cls.match(/^ring(?:-(\d+))?$/);
3194
3325
  if (ringMatch) {
3195
3326
  const width = ringMatch[1] ?? "3";
3196
- return `.${cls} { box-shadow: 0 0 0 ${width}px var(--alive-ring-color, rgba(59, 130, 246, 0.5)); }`;
3327
+ return `.${escapeSelector(cls)} { box-shadow: 0 0 0 ${width}px var(--alive-ring-color, rgba(59, 130, 246, 0.5)); }`;
3197
3328
  }
3198
- if (cls === "ring-inset") return `.${cls} { --alive-ring-inset: inset; }`;
3329
+ if (cls === "ring-inset") return `.${escapeSelector(cls)} { --alive-ring-inset: inset; }`;
3199
3330
  const ringOffsetMatch = cls.match(/^ring-offset-(\d+)$/);
3200
- if (ringOffsetMatch) return `.${cls} { --alive-ring-offset: ${ringOffsetMatch[1]}px; }`;
3201
- if (cls === "transform") return `.${cls} { transform: translateX(var(--alive-tx,0)) translateY(var(--alive-ty,0)) rotate(var(--alive-rotate,0)) scaleX(var(--alive-sx,1)) scaleY(var(--alive-sy,1)) skewX(var(--alive-skew-x,0)) skewY(var(--alive-skew-y,0)); }`;
3202
- if (cls === "transform-none") return `.${cls} { transform: none; }`;
3331
+ if (ringOffsetMatch) return `.${escapeSelector(cls)} { --alive-ring-offset: ${ringOffsetMatch[1]}px; }`;
3332
+ if (cls === "transform") return `.${escapeSelector(cls)} { transform: translateX(var(--alive-tx,0)) translateY(var(--alive-ty,0)) rotate(var(--alive-rotate,0)) scaleX(var(--alive-sx,1)) scaleY(var(--alive-sy,1)) skewX(var(--alive-skew-x,0)) skewY(var(--alive-skew-y,0)); }`;
3333
+ if (cls === "transform-none") return `.${escapeSelector(cls)} { transform: none; }`;
3203
3334
  const scaleMap = {
3204
3335
  "0": "0",
3205
3336
  "50": ".5",
@@ -3213,16 +3344,16 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3213
3344
  "150": "1.5"
3214
3345
  };
3215
3346
  const scaleMatch = cls.match(/^scale-(\d+)$/);
3216
- if (scaleMatch && has4(scaleMap, scaleMatch[1])) {
3217
- return `.${cls} { transform: scale(${scaleMap[scaleMatch[1]]}); }`;
3347
+ if (scaleMatch && has3(scaleMap, scaleMatch[1])) {
3348
+ return `.${escapeSelector(cls)} { transform: scale(${scaleMap[scaleMatch[1]]}); }`;
3218
3349
  }
3219
3350
  const scaleXMatch = cls.match(/^scale-x-(\d+)$/);
3220
- if (scaleXMatch && has4(scaleMap, scaleXMatch[1])) {
3221
- return `.${cls} { transform: scaleX(${scaleMap[scaleXMatch[1]]}); }`;
3351
+ if (scaleXMatch && has3(scaleMap, scaleXMatch[1])) {
3352
+ return `.${escapeSelector(cls)} { transform: scaleX(${scaleMap[scaleXMatch[1]]}); }`;
3222
3353
  }
3223
3354
  const scaleYMatch = cls.match(/^scale-y-(\d+)$/);
3224
- if (scaleYMatch && has4(scaleMap, scaleYMatch[1])) {
3225
- return `.${cls} { transform: scaleY(${scaleMap[scaleYMatch[1]]}); }`;
3355
+ if (scaleYMatch && has3(scaleMap, scaleYMatch[1])) {
3356
+ return `.${escapeSelector(cls)} { transform: scaleY(${scaleMap[scaleYMatch[1]]}); }`;
3226
3357
  }
3227
3358
  const rotateMatch = cls.match(/^-?rotate-(\d+)$/);
3228
3359
  if (rotateMatch) {
@@ -3245,12 +3376,12 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3245
3376
  const val = fractions[key] ?? null;
3246
3377
  if (val) return `.${cls.replace(/^-/, "\\-")} { transform: translateY(${neg}${val}); }`;
3247
3378
  }
3248
- if (cls === "transition-none") return `.${cls} { transition: none; }`;
3249
- if (cls === "transition-all") return `.${cls} { transition: all var(--alive-duration-normal) var(--alive-ease-standard); }`;
3250
- if (cls === "transition-colors") return `.${cls} { transition: color, background-color, border-color, text-decoration-color, fill, stroke; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3251
- if (cls === "transition-opacity") return `.${cls} { transition: opacity; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3252
- if (cls === "transition-shadow") return `.${cls} { transition: box-shadow; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3253
- if (cls === "transition-transform") return `.${cls} { transition: transform; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3379
+ if (cls === "transition-none") return `.${escapeSelector(cls)} { transition: none; }`;
3380
+ if (cls === "transition-all") return `.${escapeSelector(cls)} { transition: all var(--alive-duration-normal) var(--alive-ease-standard); }`;
3381
+ if (cls === "transition-colors") return `.${escapeSelector(cls)} { transition: color, background-color, border-color, text-decoration-color, fill, stroke; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3382
+ if (cls === "transition-opacity") return `.${escapeSelector(cls)} { transition: opacity; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3383
+ if (cls === "transition-shadow") return `.${escapeSelector(cls)} { transition: box-shadow; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3384
+ if (cls === "transition-transform") return `.${escapeSelector(cls)} { transition: transform; transition-duration: var(--alive-duration-normal); transition-timing-function: var(--alive-ease-standard); }`;
3254
3385
  const blurMatch = cls.match(/^blur(?:-(.+))?$/);
3255
3386
  if (blurMatch) {
3256
3387
  const blurMap = {
@@ -3264,7 +3395,7 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3264
3395
  "3xl": "64px"
3265
3396
  };
3266
3397
  const key = blurMatch[1] ?? "DEFAULT";
3267
- if (has4(blurMap, key)) return `.${cls} { filter: blur(${blurMap[key]}); }`;
3398
+ if (has3(blurMap, key)) return `.${escapeSelector(cls)} { filter: blur(${blurMap[key]}); }`;
3268
3399
  }
3269
3400
  const backdropBlurMatch = cls.match(/^backdrop-blur(?:-(.+))?$/);
3270
3401
  if (backdropBlurMatch) {
@@ -3279,7 +3410,7 @@ function matchEffects(cls, opacity, zIndex, boxShadow, borderRadius) {
3279
3410
  "3xl": "64px"
3280
3411
  };
3281
3412
  const key = backdropBlurMatch[1] ?? "DEFAULT";
3282
- if (has4(blurMap, key)) return `.${cls} { backdrop-filter: blur(${blurMap[key]}); }`;
3413
+ if (has3(blurMap, key)) return `.${escapeSelector(cls)} { backdrop-filter: blur(${blurMap[key]}); }`;
3283
3414
  }
3284
3415
  const arbOpacityMatch = cls.match(/^opacity-\[(.+)\]$/);
3285
3416
  if (arbOpacityMatch) {
@@ -3408,6 +3539,9 @@ function generateUtilities(classes, config) {
3408
3539
  case "placeholder":
3409
3540
  selector += "::placeholder";
3410
3541
  break;
3542
+ case "file":
3543
+ selector += "::file-selector-button";
3544
+ break;
3411
3545
  case "group-hover":
3412
3546
  selector = `.group:hover ${selector}`;
3413
3547
  break;
@@ -3502,275 +3636,275 @@ function generateAliveSpecific(classes, _config) {
3502
3636
  ];
3503
3637
  if (aliveBasePrefixes.some((p) => cls === p || cls.startsWith(p + "-"))) continue;
3504
3638
  if (cls === "animate-none") {
3505
- rules.push(`.${cls} { animation: none; }`);
3639
+ rules.push(`.${escapeSelector(cls)} { animation: none; }`);
3506
3640
  continue;
3507
3641
  }
3508
3642
  if (cls === "animate-spin") {
3509
- rules.push(`.${cls} { animation: alive-spin 1s linear infinite; }`);
3643
+ rules.push(`.${escapeSelector(cls)} { animation: alive-spin 1s linear infinite; }`);
3510
3644
  continue;
3511
3645
  }
3512
3646
  if (cls === "animate-ping") {
3513
- rules.push(`.${cls} { animation: alive-ping 1s cubic-bezier(0,0,0.2,1) infinite; }`);
3647
+ rules.push(`.${escapeSelector(cls)} { animation: alive-ping 1s cubic-bezier(0,0,0.2,1) infinite; }`);
3514
3648
  continue;
3515
3649
  }
3516
3650
  if (cls === "animate-pulse") {
3517
- rules.push(`.${cls} { animation: alive-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }`);
3651
+ rules.push(`.${escapeSelector(cls)} { animation: alive-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }`);
3518
3652
  continue;
3519
3653
  }
3520
3654
  if (cls === "animate-bounce") {
3521
- rules.push(`.${cls} { animation: alive-bounce 1s infinite; }`);
3655
+ rules.push(`.${escapeSelector(cls)} { animation: alive-bounce 1s infinite; }`);
3522
3656
  continue;
3523
3657
  }
3524
3658
  if (cls === "animate-shimmer") {
3525
- rules.push(`.${cls} { animation: alive-shimmer 1.5s linear infinite; }`);
3659
+ rules.push(`.${escapeSelector(cls)} { animation: alive-shimmer 1.5s linear infinite; }`);
3526
3660
  continue;
3527
3661
  }
3528
3662
  if (cls === "ease-linear") {
3529
- rules.push(`.${cls} { transition-timing-function: linear; }`);
3663
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: linear; }`);
3530
3664
  continue;
3531
3665
  }
3532
3666
  if (cls === "ease-in") {
3533
- rules.push(`.${cls} { transition-timing-function: cubic-bezier(0.4,0,1,1); }`);
3667
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: cubic-bezier(0.4,0,1,1); }`);
3534
3668
  continue;
3535
3669
  }
3536
3670
  if (cls === "ease-out") {
3537
- rules.push(`.${cls} { transition-timing-function: cubic-bezier(0,0,0.2,1); }`);
3671
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: cubic-bezier(0,0,0.2,1); }`);
3538
3672
  continue;
3539
3673
  }
3540
3674
  if (cls === "ease-in-out") {
3541
- rules.push(`.${cls} { transition-timing-function: cubic-bezier(0.4,0,0.2,1); }`);
3675
+ rules.push(`.${escapeSelector(cls)} { transition-timing-function: cubic-bezier(0.4,0,0.2,1); }`);
3542
3676
  continue;
3543
3677
  }
3544
3678
  if (cls === "group") {
3545
- rules.push(`.${cls} {}`);
3679
+ rules.push(`.${escapeSelector(cls)} {}`);
3546
3680
  continue;
3547
3681
  }
3548
3682
  const staggerMatch = cls.match(/^stagger-(\d+)$/);
3549
3683
  if (staggerMatch) {
3550
- rules.push(`.${cls} { --alive-stagger-gap: ${staggerMatch[1]}ms; }`);
3684
+ rules.push(`.${escapeSelector(cls)} { --alive-stagger-gap: ${staggerMatch[1]}ms; }`);
3551
3685
  continue;
3552
3686
  }
3553
3687
  const indexMatch = cls.match(/^alive-index-(\d+)$/);
3554
3688
  if (indexMatch) {
3555
- rules.push(`.${cls} { --alive-index: ${indexMatch[1]}; }`);
3689
+ rules.push(`.${escapeSelector(cls)} { --alive-index: ${indexMatch[1]}; }`);
3556
3690
  continue;
3557
3691
  }
3558
3692
  const durationMatch = cls.match(/^duration-(\d+)$/);
3559
3693
  if (durationMatch) {
3560
- rules.push(`.${cls} { --alive-duration: ${durationMatch[1]}ms; }`);
3694
+ rules.push(`.${escapeSelector(cls)} { --alive-duration: ${durationMatch[1]}ms; }`);
3561
3695
  continue;
3562
3696
  }
3563
3697
  const delayMatch = cls.match(/^delay-(\d+)$/);
3564
3698
  if (delayMatch) {
3565
- rules.push(`.${cls} { animation-delay: ${delayMatch[1]}ms; }`);
3699
+ rules.push(`.${escapeSelector(cls)} { animation-delay: ${delayMatch[1]}ms; }`);
3566
3700
  continue;
3567
3701
  }
3568
3702
  const motionMsMatch = cls.match(/^motion-(\d+)$/);
3569
3703
  if (motionMsMatch) {
3570
- rules.push(`.${cls} { --alive-duration: ${motionMsMatch[1]}ms !important; }`);
3704
+ rules.push(`.${escapeSelector(cls)} { --alive-duration: ${motionMsMatch[1]}ms !important; }`);
3571
3705
  continue;
3572
3706
  }
3573
3707
  if (cls === "divide-x") {
3574
- rules.push(`.${cls} > * + * { border-left-width: 1px; border-left-style: solid; }`);
3708
+ rules.push(`.${escapeSelector(cls)}> * + * { border-left-width: 1px; border-left-style: solid; }`);
3575
3709
  continue;
3576
3710
  }
3577
3711
  if (cls === "divide-y") {
3578
- rules.push(`.${cls} > * + * { border-top-width: 1px; border-top-style: solid; }`);
3712
+ rules.push(`.${escapeSelector(cls)}> * + * { border-top-width: 1px; border-top-style: solid; }`);
3579
3713
  continue;
3580
3714
  }
3581
3715
  const divideColorMatch = cls.match(/^divide-([a-z]+)(?:-(\d+))?$/);
3582
3716
  if (divideColorMatch) {
3583
- rules.push(`.${cls} > * + * { border-color: inherit; }`);
3717
+ rules.push(`.${escapeSelector(cls)}> * + * { border-color: inherit; }`);
3584
3718
  continue;
3585
3719
  }
3586
3720
  if (cls === "appearance-none") {
3587
- rules.push(`.${cls} { appearance: none; }`);
3721
+ rules.push(`.${escapeSelector(cls)} { appearance: none; }`);
3588
3722
  continue;
3589
3723
  }
3590
3724
  if (cls === "appearance-auto") {
3591
- rules.push(`.${cls} { appearance: auto; }`);
3725
+ rules.push(`.${escapeSelector(cls)} { appearance: auto; }`);
3592
3726
  continue;
3593
3727
  }
3594
3728
  if (cls === "resize-none") {
3595
- rules.push(`.${cls} { resize: none; }`);
3729
+ rules.push(`.${escapeSelector(cls)} { resize: none; }`);
3596
3730
  continue;
3597
3731
  }
3598
3732
  if (cls === "resize") {
3599
- rules.push(`.${cls} { resize: both; }`);
3733
+ rules.push(`.${escapeSelector(cls)} { resize: both; }`);
3600
3734
  continue;
3601
3735
  }
3602
3736
  if (cls === "resize-y") {
3603
- rules.push(`.${cls} { resize: vertical; }`);
3737
+ rules.push(`.${escapeSelector(cls)} { resize: vertical; }`);
3604
3738
  continue;
3605
3739
  }
3606
3740
  if (cls === "resize-x") {
3607
- rules.push(`.${cls} { resize: horizontal; }`);
3741
+ rules.push(`.${escapeSelector(cls)} { resize: horizontal; }`);
3608
3742
  continue;
3609
3743
  }
3610
3744
  if (cls === "snap-none") {
3611
- rules.push(`.${cls} { scroll-snap-type: none; }`);
3745
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-type: none; }`);
3612
3746
  continue;
3613
3747
  }
3614
3748
  if (cls === "snap-x") {
3615
- rules.push(`.${cls} { scroll-snap-type: x mandatory; }`);
3749
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-type: x mandatory; }`);
3616
3750
  continue;
3617
3751
  }
3618
3752
  if (cls === "snap-y") {
3619
- rules.push(`.${cls} { scroll-snap-type: y mandatory; }`);
3753
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-type: y mandatory; }`);
3620
3754
  continue;
3621
3755
  }
3622
3756
  if (cls === "snap-start") {
3623
- rules.push(`.${cls} { scroll-snap-align: start; }`);
3757
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-align: start; }`);
3624
3758
  continue;
3625
3759
  }
3626
3760
  if (cls === "snap-center") {
3627
- rules.push(`.${cls} { scroll-snap-align: center; }`);
3761
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-align: center; }`);
3628
3762
  continue;
3629
3763
  }
3630
3764
  if (cls === "snap-end") {
3631
- rules.push(`.${cls} { scroll-snap-align: end; }`);
3765
+ rules.push(`.${escapeSelector(cls)} { scroll-snap-align: end; }`);
3632
3766
  continue;
3633
3767
  }
3634
3768
  if (cls === "pointer-events-none") {
3635
- rules.push(`.${cls} { pointer-events: none; }`);
3769
+ rules.push(`.${escapeSelector(cls)} { pointer-events: none; }`);
3636
3770
  continue;
3637
3771
  }
3638
3772
  if (cls === "pointer-events-auto") {
3639
- rules.push(`.${cls} { pointer-events: auto; }`);
3773
+ rules.push(`.${escapeSelector(cls)} { pointer-events: auto; }`);
3640
3774
  continue;
3641
3775
  }
3642
3776
  if (cls === "sr-only") {
3643
- rules.push(`.${cls} { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }`);
3777
+ rules.push(`.${escapeSelector(cls)} { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }`);
3644
3778
  continue;
3645
3779
  }
3646
3780
  if (cls === "not-sr-only") {
3647
- rules.push(`.${cls} { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; }`);
3781
+ rules.push(`.${escapeSelector(cls)} { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; }`);
3648
3782
  continue;
3649
3783
  }
3650
3784
  if (cls === "will-change-auto") {
3651
- rules.push(`.${cls} { will-change: auto; }`);
3785
+ rules.push(`.${escapeSelector(cls)} { will-change: auto; }`);
3652
3786
  continue;
3653
3787
  }
3654
3788
  if (cls === "will-change-transform") {
3655
- rules.push(`.${cls} { will-change: transform; }`);
3789
+ rules.push(`.${escapeSelector(cls)} { will-change: transform; }`);
3656
3790
  continue;
3657
3791
  }
3658
3792
  if (cls === "will-change-opacity") {
3659
- rules.push(`.${cls} { will-change: opacity; }`);
3793
+ rules.push(`.${escapeSelector(cls)} { will-change: opacity; }`);
3660
3794
  continue;
3661
3795
  }
3662
3796
  const lineClampMatch = cls.match(/^line-clamp-(\d+)$/);
3663
3797
  if (lineClampMatch) {
3664
3798
  const n = lineClampMatch[1];
3665
- rules.push(`.${cls} { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${n}; -webkit-box-orient: vertical; }`);
3799
+ rules.push(`.${escapeSelector(cls)} { overflow: hidden; display: -webkit-box; -webkit-line-clamp: ${n}; -webkit-box-orient: vertical; }`);
3666
3800
  continue;
3667
3801
  }
3668
3802
  if (cls === "aspect-square") {
3669
- rules.push(`.${cls} { aspect-ratio: 1 / 1; }`);
3803
+ rules.push(`.${escapeSelector(cls)} { aspect-ratio: 1 / 1; }`);
3670
3804
  continue;
3671
3805
  }
3672
3806
  if (cls === "aspect-video") {
3673
- rules.push(`.${cls} { aspect-ratio: 16 / 9; }`);
3807
+ rules.push(`.${escapeSelector(cls)} { aspect-ratio: 16 / 9; }`);
3674
3808
  continue;
3675
3809
  }
3676
3810
  if (cls === "aspect-auto") {
3677
- rules.push(`.${cls} { aspect-ratio: auto; }`);
3811
+ rules.push(`.${escapeSelector(cls)} { aspect-ratio: auto; }`);
3678
3812
  continue;
3679
3813
  }
3680
3814
  if (cls === "object-contain") {
3681
- rules.push(`.${cls} { object-fit: contain; }`);
3815
+ rules.push(`.${escapeSelector(cls)} { object-fit: contain; }`);
3682
3816
  continue;
3683
3817
  }
3684
3818
  if (cls === "object-cover") {
3685
- rules.push(`.${cls} { object-fit: cover; }`);
3819
+ rules.push(`.${escapeSelector(cls)} { object-fit: cover; }`);
3686
3820
  continue;
3687
3821
  }
3688
3822
  if (cls === "object-fill") {
3689
- rules.push(`.${cls} { object-fit: fill; }`);
3823
+ rules.push(`.${escapeSelector(cls)} { object-fit: fill; }`);
3690
3824
  continue;
3691
3825
  }
3692
3826
  if (cls === "object-none") {
3693
- rules.push(`.${cls} { object-fit: none; }`);
3827
+ rules.push(`.${escapeSelector(cls)} { object-fit: none; }`);
3694
3828
  continue;
3695
3829
  }
3696
3830
  if (cls === "object-scale") {
3697
- rules.push(`.${cls} { object-fit: scale-down; }`);
3831
+ rules.push(`.${escapeSelector(cls)} { object-fit: scale-down; }`);
3698
3832
  continue;
3699
3833
  }
3700
3834
  if (cls === "mix-blend-multiply") {
3701
- rules.push(`.${cls} { mix-blend-mode: multiply; }`);
3835
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: multiply; }`);
3702
3836
  continue;
3703
3837
  }
3704
3838
  if (cls === "mix-blend-screen") {
3705
- rules.push(`.${cls} { mix-blend-mode: screen; }`);
3839
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: screen; }`);
3706
3840
  continue;
3707
3841
  }
3708
3842
  if (cls === "mix-blend-overlay") {
3709
- rules.push(`.${cls} { mix-blend-mode: overlay; }`);
3843
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: overlay; }`);
3710
3844
  continue;
3711
3845
  }
3712
3846
  if (cls === "mix-blend-normal") {
3713
- rules.push(`.${cls} { mix-blend-mode: normal; }`);
3847
+ rules.push(`.${escapeSelector(cls)} { mix-blend-mode: normal; }`);
3714
3848
  continue;
3715
3849
  }
3716
3850
  if (cls === "isolate") {
3717
- rules.push(`.${cls} { isolation: isolate; }`);
3851
+ rules.push(`.${escapeSelector(cls)} { isolation: isolate; }`);
3718
3852
  continue;
3719
3853
  }
3720
3854
  if (cls === "isolation-auto") {
3721
- rules.push(`.${cls} { isolation: auto; }`);
3855
+ rules.push(`.${escapeSelector(cls)} { isolation: auto; }`);
3722
3856
  continue;
3723
3857
  }
3724
3858
  if (cls === "touch-auto") {
3725
- rules.push(`.${cls} { touch-action: auto; }`);
3859
+ rules.push(`.${escapeSelector(cls)} { touch-action: auto; }`);
3726
3860
  continue;
3727
3861
  }
3728
3862
  if (cls === "touch-none") {
3729
- rules.push(`.${cls} { touch-action: none; }`);
3863
+ rules.push(`.${escapeSelector(cls)} { touch-action: none; }`);
3730
3864
  continue;
3731
3865
  }
3732
3866
  if (cls === "touch-pan-x") {
3733
- rules.push(`.${cls} { touch-action: pan-x; }`);
3867
+ rules.push(`.${escapeSelector(cls)} { touch-action: pan-x; }`);
3734
3868
  continue;
3735
3869
  }
3736
3870
  if (cls === "touch-pan-y") {
3737
- rules.push(`.${cls} { touch-action: pan-y; }`);
3871
+ rules.push(`.${escapeSelector(cls)} { touch-action: pan-y; }`);
3738
3872
  continue;
3739
3873
  }
3740
3874
  if (cls === "touch-manipulation") {
3741
- rules.push(`.${cls} { touch-action: manipulation; }`);
3875
+ rules.push(`.${escapeSelector(cls)} { touch-action: manipulation; }`);
3742
3876
  continue;
3743
3877
  }
3744
3878
  if (cls === "select-none") {
3745
- rules.push(`.${cls} { user-select: none; }`);
3879
+ rules.push(`.${escapeSelector(cls)} { user-select: none; }`);
3746
3880
  continue;
3747
3881
  }
3748
3882
  if (cls === "select-text") {
3749
- rules.push(`.${cls} { user-select: text; }`);
3883
+ rules.push(`.${escapeSelector(cls)} { user-select: text; }`);
3750
3884
  continue;
3751
3885
  }
3752
3886
  if (cls === "select-all") {
3753
- rules.push(`.${cls} { user-select: all; }`);
3887
+ rules.push(`.${escapeSelector(cls)} { user-select: all; }`);
3754
3888
  continue;
3755
3889
  }
3756
3890
  if (cls === "select-auto") {
3757
- rules.push(`.${cls} { user-select: auto; }`);
3891
+ rules.push(`.${escapeSelector(cls)} { user-select: auto; }`);
3758
3892
  continue;
3759
3893
  }
3760
3894
  if (cls === "break-normal") {
3761
- rules.push(`.${cls} { overflow-wrap: normal; word-break: normal; }`);
3895
+ rules.push(`.${escapeSelector(cls)} { overflow-wrap: normal; word-break: normal; }`);
3762
3896
  continue;
3763
3897
  }
3764
3898
  if (cls === "break-words") {
3765
- rules.push(`.${cls} { overflow-wrap: break-word; }`);
3899
+ rules.push(`.${escapeSelector(cls)} { overflow-wrap: break-word; }`);
3766
3900
  continue;
3767
3901
  }
3768
3902
  if (cls === "break-all") {
3769
- rules.push(`.${cls} { word-break: break-all; }`);
3903
+ rules.push(`.${escapeSelector(cls)} { word-break: break-all; }`);
3770
3904
  continue;
3771
3905
  }
3772
3906
  if (cls === "break-keep") {
3773
- rules.push(`.${cls} { word-break: keep-all; }`);
3907
+ rules.push(`.${escapeSelector(cls)} { word-break: keep-all; }`);
3774
3908
  continue;
3775
3909
  }
3776
3910
  }