tailwindcss 3.2.6 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +52 -8
  2. package/lib/cli/build/index.js +7 -3
  3. package/lib/cli/build/plugin.js +28 -19
  4. package/lib/cli/build/watching.js +4 -2
  5. package/lib/cli/index.js +12 -21
  6. package/lib/cli/init/index.js +21 -6
  7. package/lib/corePluginList.js +4 -0
  8. package/lib/corePlugins.js +282 -26
  9. package/lib/css/preflight.css +2 -0
  10. package/lib/featureFlags.js +8 -1
  11. package/lib/lib/expandApplyAtRules.js +2 -1
  12. package/lib/lib/generateRules.js +20 -16
  13. package/lib/lib/getModuleDependencies.js +79 -33
  14. package/lib/lib/load-config.js +36 -0
  15. package/lib/lib/setupContextUtils.js +10 -2
  16. package/lib/lib/setupTrackingContext.js +4 -4
  17. package/lib/oxide/cli/build/index.js +7 -3
  18. package/lib/oxide/cli/build/plugin.js +27 -18
  19. package/lib/oxide/cli/build/watching.js +1 -1
  20. package/lib/oxide/cli/index.js +10 -16
  21. package/lib/oxide/cli/init/index.js +19 -4
  22. package/lib/public/colors.js +44 -22
  23. package/lib/public/default-config.js +2 -2
  24. package/lib/public/default-theme.js +2 -2
  25. package/lib/public/load-config.js +10 -0
  26. package/lib/util/applyImportantSelector.js +22 -0
  27. package/lib/util/dataTypes.js +3 -0
  28. package/lib/util/formatVariantSelector.js +2 -12
  29. package/lib/util/getAllConfigs.js +2 -2
  30. package/lib/util/normalizeConfig.js +16 -3
  31. package/lib/util/pluginUtils.js +14 -26
  32. package/lib/util/resolveConfigPath.js +19 -7
  33. package/lib/util/splitAtTopLevelOnly.js +7 -1
  34. package/loadConfig.d.ts +4 -0
  35. package/loadConfig.js +2 -0
  36. package/package.json +5 -4
  37. package/src/cli/build/index.js +7 -7
  38. package/src/cli/build/plugin.js +28 -23
  39. package/src/cli/build/watching.js +4 -2
  40. package/src/cli/index.js +8 -26
  41. package/src/cli/init/index.js +37 -8
  42. package/src/corePluginList.js +1 -1
  43. package/src/corePlugins.js +184 -27
  44. package/src/css/preflight.css +2 -0
  45. package/src/featureFlags.js +7 -0
  46. package/src/lib/expandApplyAtRules.js +2 -1
  47. package/src/lib/generateRules.js +35 -15
  48. package/src/lib/getModuleDependencies.js +70 -30
  49. package/src/lib/load-config.ts +27 -0
  50. package/src/lib/setupContextUtils.js +9 -2
  51. package/src/lib/setupTrackingContext.js +4 -4
  52. package/src/oxide/cli/build/index.ts +7 -7
  53. package/src/oxide/cli/build/plugin.ts +28 -22
  54. package/src/oxide/cli/build/watching.ts +1 -1
  55. package/src/oxide/cli/index.ts +7 -15
  56. package/src/oxide/cli/init/index.ts +34 -7
  57. package/src/public/colors.js +22 -0
  58. package/src/public/default-config.js +1 -1
  59. package/src/public/default-theme.js +2 -2
  60. package/src/public/load-config.js +2 -0
  61. package/src/util/applyImportantSelector.js +19 -0
  62. package/src/util/dataTypes.js +4 -0
  63. package/src/util/formatVariantSelector.js +1 -1
  64. package/src/util/getAllConfigs.js +2 -2
  65. package/src/util/normalizeConfig.js +19 -1
  66. package/src/util/pluginUtils.js +20 -31
  67. package/src/util/resolveConfigPath.js +12 -1
  68. package/src/util/splitAtTopLevelOnly.js +8 -1
  69. package/stubs/.gitignore +1 -0
  70. package/stubs/.prettierrc.json +6 -0
  71. package/stubs/{defaultConfig.stub.js → config.full.js} +38 -3
  72. package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -1
  73. package/stubs/postcss.config.js +6 -0
  74. package/stubs/tailwind.config.cjs +2 -0
  75. package/stubs/tailwind.config.js +2 -0
  76. package/stubs/tailwind.config.ts +3 -0
  77. package/types/config.d.ts +7 -1
  78. package/types/generated/colors.d.ts +22 -0
  79. package/types/generated/corePluginList.d.ts +1 -1
  80. package/types/generated/default-theme.d.ts +31 -2
  81. package/lib/constants.js +0 -44
  82. package/src/constants.js +0 -17
  83. /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
@@ -15,6 +15,7 @@ _export(exports, {
15
15
  const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
16
16
  const _path = /*#__PURE__*/ _interopRequireWildcard(require("path"));
17
17
  const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
18
+ const _sharedState = require("./lib/sharedState");
18
19
  const _createUtilityPlugin = /*#__PURE__*/ _interopRequireDefault(require("./util/createUtilityPlugin"));
19
20
  const _buildMediaQuery = /*#__PURE__*/ _interopRequireDefault(require("./util/buildMediaQuery"));
20
21
  const _escapeClassName = /*#__PURE__*/ _interopRequireDefault(require("./util/escapeClassName"));
@@ -256,20 +257,8 @@ let variantPlugins = {
256
257
  }
257
258
  },
258
259
  directionVariants: ({ addVariant })=>{
259
- addVariant("ltr", ()=>{
260
- _log.default.warn("rtl-experimental", [
261
- "The RTL features in Tailwind CSS are currently in preview.",
262
- "Preview features are not covered by semver, and may be improved in breaking ways at any time."
263
- ]);
264
- return '[dir="ltr"] &';
265
- });
266
- addVariant("rtl", ()=>{
267
- _log.default.warn("rtl-experimental", [
268
- "The RTL features in Tailwind CSS are currently in preview.",
269
- "Preview features are not covered by semver, and may be improved in breaking ways at any time."
270
- ]);
271
- return '[dir="rtl"] &';
272
- });
260
+ addVariant("ltr", ':is([dir="ltr"] &)');
261
+ addVariant("rtl", ':is([dir="rtl"] &)');
273
262
  },
274
263
  reducedMotionVariants: ({ addVariant })=>{
275
264
  addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)");
@@ -286,7 +275,7 @@ let variantPlugins = {
286
275
  ]);
287
276
  }
288
277
  if (mode === "class") {
289
- addVariant("dark", `${className} &`);
278
+ addVariant("dark", `:is(${className} &)`);
290
279
  } else if (mode === "media") {
291
280
  addVariant("dark", "@media (prefers-color-scheme: dark)");
292
281
  }
@@ -645,10 +634,7 @@ let corePlugins = {
645
634
  [
646
635
  "inset",
647
636
  [
648
- "top",
649
- "right",
650
- "bottom",
651
- "left"
637
+ "inset"
652
638
  ]
653
639
  ],
654
640
  [
@@ -668,6 +654,18 @@ let corePlugins = {
668
654
  ]
669
655
  ],
670
656
  [
657
+ [
658
+ "start",
659
+ [
660
+ "inset-inline-start"
661
+ ]
662
+ ],
663
+ [
664
+ "end",
665
+ [
666
+ "inset-inline-end"
667
+ ]
668
+ ],
671
669
  [
672
670
  "top",
673
671
  [
@@ -820,6 +818,18 @@ let corePlugins = {
820
818
  ]
821
819
  ],
822
820
  [
821
+ [
822
+ "ms",
823
+ [
824
+ "margin-inline-start"
825
+ ]
826
+ ],
827
+ [
828
+ "me",
829
+ [
830
+ "margin-inline-end"
831
+ ]
832
+ ],
823
833
  [
824
834
  "mt",
825
835
  [
@@ -858,6 +868,26 @@ let corePlugins = {
858
868
  }
859
869
  });
860
870
  },
871
+ lineClamp: ({ matchUtilities , addUtilities , theme })=>{
872
+ matchUtilities({
873
+ "line-clamp": (value)=>({
874
+ overflow: "hidden",
875
+ display: "-webkit-box",
876
+ "-webkit-box-orient": "vertical",
877
+ "-webkit-line-clamp": `${value}`
878
+ })
879
+ }, {
880
+ values: theme("lineClamp")
881
+ });
882
+ addUtilities({
883
+ ".line-clamp-none": {
884
+ overflow: "visible",
885
+ display: "block",
886
+ "-webkit-box-orient": "horizontal",
887
+ "-webkit-line-clamp": "none"
888
+ }
889
+ });
890
+ },
861
891
  display: ({ addUtilities })=>{
862
892
  addUtilities({
863
893
  ".block": {
@@ -1028,6 +1058,16 @@ let corePlugins = {
1028
1058
  }
1029
1059
  });
1030
1060
  },
1061
+ captionSide: ({ addUtilities })=>{
1062
+ addUtilities({
1063
+ ".caption-top": {
1064
+ "caption-side": "top"
1065
+ },
1066
+ ".caption-bottom": {
1067
+ "caption-side": "bottom"
1068
+ }
1069
+ });
1070
+ },
1031
1071
  borderCollapse: ({ addUtilities })=>{
1032
1072
  addUtilities({
1033
1073
  ".border-collapse": {
@@ -1434,6 +1474,18 @@ let corePlugins = {
1434
1474
  ]
1435
1475
  ],
1436
1476
  [
1477
+ [
1478
+ "scroll-ms",
1479
+ [
1480
+ "scroll-margin-inline-start"
1481
+ ]
1482
+ ],
1483
+ [
1484
+ "scroll-me",
1485
+ [
1486
+ "scroll-margin-inline-end"
1487
+ ]
1488
+ ],
1437
1489
  [
1438
1490
  "scroll-mt",
1439
1491
  [
@@ -1486,6 +1538,18 @@ let corePlugins = {
1486
1538
  ]
1487
1539
  ],
1488
1540
  [
1541
+ [
1542
+ "scroll-ps",
1543
+ [
1544
+ "scroll-padding-inline-start"
1545
+ ]
1546
+ ],
1547
+ [
1548
+ "scroll-pe",
1549
+ [
1550
+ "scroll-padding-inline-end"
1551
+ ]
1552
+ ],
1489
1553
  [
1490
1554
  "scroll-pt",
1491
1555
  [
@@ -1530,6 +1594,14 @@ let corePlugins = {
1530
1594
  ]
1531
1595
  ]
1532
1596
  ]),
1597
+ listStyleImage: (0, _createUtilityPlugin.default)("listStyleImage", [
1598
+ [
1599
+ "list-image",
1600
+ [
1601
+ "listStyleImage"
1602
+ ]
1603
+ ]
1604
+ ]),
1533
1605
  appearance: ({ addUtilities })=>{
1534
1606
  addUtilities({
1535
1607
  ".appearance-none": {
@@ -1746,6 +1818,9 @@ let corePlugins = {
1746
1818
  },
1747
1819
  alignContent: ({ addUtilities })=>{
1748
1820
  addUtilities({
1821
+ ".content-normal": {
1822
+ "align-content": "normal"
1823
+ },
1749
1824
  ".content-center": {
1750
1825
  "align-content": "center"
1751
1826
  },
@@ -1766,6 +1841,9 @@ let corePlugins = {
1766
1841
  },
1767
1842
  ".content-baseline": {
1768
1843
  "align-content": "baseline"
1844
+ },
1845
+ ".content-stretch": {
1846
+ "align-content": "stretch"
1769
1847
  }
1770
1848
  });
1771
1849
  },
@@ -1790,6 +1868,9 @@ let corePlugins = {
1790
1868
  },
1791
1869
  justifyContent: ({ addUtilities })=>{
1792
1870
  addUtilities({
1871
+ ".justify-normal": {
1872
+ "justify-content": "normal"
1873
+ },
1793
1874
  ".justify-start": {
1794
1875
  "justify-content": "flex-start"
1795
1876
  },
@@ -1807,6 +1888,9 @@ let corePlugins = {
1807
1888
  },
1808
1889
  ".justify-evenly": {
1809
1890
  "justify-content": "space-evenly"
1891
+ },
1892
+ ".justify-stretch": {
1893
+ "justify-content": "stretch"
1810
1894
  }
1811
1895
  });
1812
1896
  },
@@ -1852,6 +1936,15 @@ let corePlugins = {
1852
1936
  matchUtilities({
1853
1937
  "space-x": (value)=>{
1854
1938
  value = value === "0" ? "0px" : value;
1939
+ if (_sharedState.env.OXIDE) {
1940
+ return {
1941
+ "& > :not([hidden]) ~ :not([hidden])": {
1942
+ "--tw-space-x-reverse": "0",
1943
+ "margin-inline-end": `calc(${value} * var(--tw-space-x-reverse))`,
1944
+ "margin-inline-start": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
1945
+ }
1946
+ };
1947
+ }
1855
1948
  return {
1856
1949
  "& > :not([hidden]) ~ :not([hidden])": {
1857
1950
  "--tw-space-x-reverse": "0",
@@ -1887,6 +1980,16 @@ let corePlugins = {
1887
1980
  matchUtilities({
1888
1981
  "divide-x": (value)=>{
1889
1982
  value = value === "0" ? "0px" : value;
1983
+ if (_sharedState.env.OXIDE) {
1984
+ return {
1985
+ "& > :not([hidden]) ~ :not([hidden])": {
1986
+ "@defaults border-width": {},
1987
+ "--tw-divide-x-reverse": "0",
1988
+ "border-inline-end-width": `calc(${value} * var(--tw-divide-x-reverse))`,
1989
+ "border-inline-start-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
1990
+ }
1991
+ };
1992
+ }
1890
1993
  return {
1891
1994
  "& > :not([hidden]) ~ :not([hidden])": {
1892
1995
  "@defaults border-width": {},
@@ -2152,6 +2255,19 @@ let corePlugins = {
2152
2255
  }
2153
2256
  });
2154
2257
  },
2258
+ hyphens: ({ addUtilities })=>{
2259
+ addUtilities({
2260
+ ".hyphens-none": {
2261
+ hyphens: "none"
2262
+ },
2263
+ ".hyphens-manual": {
2264
+ hyphens: "manual"
2265
+ },
2266
+ ".hyphens-auto": {
2267
+ hyphens: "auto"
2268
+ }
2269
+ });
2270
+ },
2155
2271
  whitespace: ({ addUtilities })=>{
2156
2272
  addUtilities({
2157
2273
  ".whitespace-normal": {
@@ -2168,6 +2284,9 @@ let corePlugins = {
2168
2284
  },
2169
2285
  ".whitespace-pre-wrap": {
2170
2286
  "white-space": "pre-wrap"
2287
+ },
2288
+ ".whitespace-break-spaces": {
2289
+ "white-space": "break-spaces"
2171
2290
  }
2172
2291
  });
2173
2292
  },
@@ -2196,6 +2315,20 @@ let corePlugins = {
2196
2315
  ]
2197
2316
  ],
2198
2317
  [
2318
+ [
2319
+ "rounded-s",
2320
+ [
2321
+ "border-start-start-radius",
2322
+ "border-end-start-radius"
2323
+ ]
2324
+ ],
2325
+ [
2326
+ "rounded-e",
2327
+ [
2328
+ "border-start-end-radius",
2329
+ "border-end-end-radius"
2330
+ ]
2331
+ ],
2199
2332
  [
2200
2333
  "rounded-t",
2201
2334
  [
@@ -2226,6 +2359,30 @@ let corePlugins = {
2226
2359
  ]
2227
2360
  ],
2228
2361
  [
2362
+ [
2363
+ "rounded-ss",
2364
+ [
2365
+ "border-start-start-radius"
2366
+ ]
2367
+ ],
2368
+ [
2369
+ "rounded-se",
2370
+ [
2371
+ "border-start-end-radius"
2372
+ ]
2373
+ ],
2374
+ [
2375
+ "rounded-ee",
2376
+ [
2377
+ "border-end-end-radius"
2378
+ ]
2379
+ ],
2380
+ [
2381
+ "rounded-es",
2382
+ [
2383
+ "border-end-start-radius"
2384
+ ]
2385
+ ],
2229
2386
  [
2230
2387
  "rounded-tl",
2231
2388
  [
@@ -2288,6 +2445,26 @@ let corePlugins = {
2288
2445
  ]
2289
2446
  ],
2290
2447
  [
2448
+ [
2449
+ "border-s",
2450
+ [
2451
+ [
2452
+ "@defaults border-width",
2453
+ {}
2454
+ ],
2455
+ "border-inline-start-width"
2456
+ ]
2457
+ ],
2458
+ [
2459
+ "border-e",
2460
+ [
2461
+ [
2462
+ "@defaults border-width",
2463
+ {}
2464
+ ],
2465
+ "border-inline-end-width"
2466
+ ]
2467
+ ],
2291
2468
  [
2292
2469
  "border-t",
2293
2470
  [
@@ -2419,6 +2596,30 @@ let corePlugins = {
2419
2596
  ]
2420
2597
  });
2421
2598
  matchUtilities({
2599
+ "border-s": (value)=>{
2600
+ if (!corePlugins("borderOpacity")) {
2601
+ return {
2602
+ "border-inline-start-color": (0, _toColorValue.default)(value)
2603
+ };
2604
+ }
2605
+ return (0, _withAlphaVariable.default)({
2606
+ color: value,
2607
+ property: "border-inline-start-color",
2608
+ variable: "--tw-border-opacity"
2609
+ });
2610
+ },
2611
+ "border-e": (value)=>{
2612
+ if (!corePlugins("borderOpacity")) {
2613
+ return {
2614
+ "border-inline-end-color": (0, _toColorValue.default)(value)
2615
+ };
2616
+ }
2617
+ return (0, _withAlphaVariable.default)({
2618
+ color: value,
2619
+ property: "border-inline-end-color",
2620
+ variable: "--tw-border-opacity"
2621
+ });
2622
+ },
2422
2623
  "border-t": (value)=>{
2423
2624
  if (!corePlugins("borderOpacity")) {
2424
2625
  return {
@@ -2539,30 +2740,63 @@ let corePlugins = {
2539
2740
  "any"
2540
2741
  ]
2541
2742
  };
2743
+ let positionOptions = {
2744
+ values: theme("gradientColorStopPositions"),
2745
+ type: [
2746
+ "length",
2747
+ "percentage"
2748
+ ]
2749
+ };
2542
2750
  matchUtilities({
2543
2751
  from: (value)=>{
2544
2752
  let transparentToValue = transparentTo(value);
2545
2753
  return {
2546
- "--tw-gradient-from": (0, _toColorValue.default)(value, "from"),
2547
- "--tw-gradient-to": transparentToValue,
2754
+ "--tw-gradient-from": `${(0, _toColorValue.default)(value, "from")} var(--tw-gradient-from-position)`,
2755
+ "--tw-gradient-from-position": " ",
2756
+ "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-from-position)`,
2757
+ "--tw-gradient-to-position": " ",
2548
2758
  "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)`
2549
2759
  };
2550
2760
  }
2551
2761
  }, options);
2762
+ matchUtilities({
2763
+ from: (value)=>{
2764
+ return {
2765
+ "--tw-gradient-from-position": value
2766
+ };
2767
+ }
2768
+ }, positionOptions);
2552
2769
  matchUtilities({
2553
2770
  via: (value)=>{
2554
2771
  let transparentToValue = transparentTo(value);
2555
2772
  return {
2556
- "--tw-gradient-to": transparentToValue,
2557
- "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")}, var(--tw-gradient-to)`
2773
+ "--tw-gradient-via-position": " ",
2774
+ "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
2775
+ "--tw-gradient-to-position": " ",
2776
+ "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")} var(--tw-gradient-via-position), var(--tw-gradient-to)`
2558
2777
  };
2559
2778
  }
2560
2779
  }, options);
2780
+ matchUtilities({
2781
+ via: (value)=>{
2782
+ return {
2783
+ "--tw-gradient-via-position": value
2784
+ };
2785
+ }
2786
+ }, positionOptions);
2561
2787
  matchUtilities({
2562
2788
  to: (value)=>({
2563
- "--tw-gradient-to": (0, _toColorValue.default)(value, "to")
2789
+ "--tw-gradient-to": `${(0, _toColorValue.default)(value, "to")} var(--tw-gradient-to-position)`,
2790
+ "--tw-gradient-to-position": " "
2564
2791
  })
2565
2792
  }, options);
2793
+ matchUtilities({
2794
+ to: (value)=>{
2795
+ return {
2796
+ "--tw-gradient-to-position": value
2797
+ };
2798
+ }
2799
+ }, positionOptions);
2566
2800
  };
2567
2801
  })(),
2568
2802
  boxDecorationBreak: ({ addUtilities })=>{
@@ -2774,6 +3008,18 @@ let corePlugins = {
2774
3008
  ]
2775
3009
  ],
2776
3010
  [
3011
+ [
3012
+ "ps",
3013
+ [
3014
+ "padding-inline-start"
3015
+ ]
3016
+ ],
3017
+ [
3018
+ "pe",
3019
+ [
3020
+ "padding-inline-end"
3021
+ ]
3022
+ ],
2777
3023
  [
2778
3024
  "pt",
2779
3025
  [
@@ -2871,11 +3117,14 @@ let corePlugins = {
2871
3117
  let [families, options = {}] = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value : [
2872
3118
  value
2873
3119
  ];
2874
- let { fontFeatureSettings } = options;
3120
+ let { fontFeatureSettings , fontVariationSettings } = options;
2875
3121
  return {
2876
3122
  "font-family": Array.isArray(families) ? families.join(", ") : families,
2877
3123
  ...fontFeatureSettings === undefined ? {} : {
2878
3124
  "font-feature-settings": fontFeatureSettings
3125
+ },
3126
+ ...fontVariationSettings === undefined ? {} : {
3127
+ "font-variation-settings": fontVariationSettings
2879
3128
  }
2880
3129
  };
2881
3130
  }
@@ -2890,10 +3139,16 @@ let corePlugins = {
2890
3139
  },
2891
3140
  fontSize: ({ matchUtilities , theme })=>{
2892
3141
  matchUtilities({
2893
- text: (value)=>{
3142
+ text: (value, { modifier })=>{
2894
3143
  let [fontSize, options] = Array.isArray(value) ? value : [
2895
3144
  value
2896
3145
  ];
3146
+ if (modifier) {
3147
+ return {
3148
+ "font-size": fontSize,
3149
+ "line-height": modifier
3150
+ };
3151
+ }
2897
3152
  let { lineHeight , letterSpacing , fontWeight } = (0, _isPlainObject.default)(options) ? options : {
2898
3153
  lineHeight: options
2899
3154
  };
@@ -2912,6 +3167,7 @@ let corePlugins = {
2912
3167
  }
2913
3168
  }, {
2914
3169
  values: theme("fontSize"),
3170
+ modifiers: theme("lineHeight"),
2915
3171
  type: [
2916
3172
  "absolute-size",
2917
3173
  "relative-size",
@@ -23,6 +23,7 @@
23
23
  3. Use a more readable tab size.
24
24
  4. Use the user's configured `sans` font-family by default.
25
25
  5. Use the user's configured `sans` font-feature-settings by default.
26
+ 6. Use the user's configured `sans` font-variation-settings by default.
26
27
  */
27
28
 
28
29
  html {
@@ -32,6 +33,7 @@ html {
32
33
  tab-size: 4; /* 3 */
33
34
  font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
34
35
  font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
36
+ font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
35
37
  }
36
38
 
37
39
  /*
@@ -15,6 +15,7 @@ _export(exports, {
15
15
  });
16
16
  const _picocolors = /*#__PURE__*/ _interopRequireDefault(require("picocolors"));
17
17
  const _log = /*#__PURE__*/ _interopRequireDefault(require("./util/log"));
18
+ const _sharedState = require("./lib/sharedState");
18
19
  function _interopRequireDefault(obj) {
19
20
  return obj && obj.__esModule ? obj : {
20
21
  default: obj
@@ -22,7 +23,13 @@ function _interopRequireDefault(obj) {
22
23
  }
23
24
  let defaults = {
24
25
  optimizeUniversalDefaults: false,
25
- generalizedModifiers: true
26
+ generalizedModifiers: true,
27
+ get disableColorOpacityUtilitiesByDefault () {
28
+ return _sharedState.env.OXIDE;
29
+ },
30
+ get relativeContentPathsByDefault () {
31
+ return _sharedState.env.OXIDE;
32
+ }
26
33
  };
27
34
  let featureFlags = {
28
35
  future: [
@@ -10,6 +10,7 @@ const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
10
10
  const _postcssSelectorParser = /*#__PURE__*/ _interopRequireDefault(require("postcss-selector-parser"));
11
11
  const _generateRules = require("./generateRules");
12
12
  const _escapeClassName = /*#__PURE__*/ _interopRequireDefault(require("../util/escapeClassName"));
13
+ const _applyImportantSelector = require("../util/applyImportantSelector");
13
14
  function _interopRequireDefault(obj) {
14
15
  return obj && obj.__esModule ? obj : {
15
16
  default: obj
@@ -481,7 +482,7 @@ function processApply(root, context, localCache) {
481
482
  rule.selector = replaceSelector(parentSelector, rule.selector, applyCandidate1);
482
483
  // And then re-add it if it was removed
483
484
  if (importantSelector && parentSelector !== parent.selector) {
484
- rule.selector = `${importantSelector} ${rule.selector}`;
485
+ rule.selector = (0, _applyImportantSelector.applyImportantSelector)(rule.selector, importantSelector);
485
486
  }
486
487
  rule.walkDecls((d)=>{
487
488
  d.important = meta.important || important1;
@@ -28,6 +28,7 @@ const _setupContextUtils = require("./setupContextUtils");
28
28
  const _isSyntacticallyValidPropertyValue = /*#__PURE__*/ _interopRequireDefault(require("../util/isSyntacticallyValidPropertyValue"));
29
29
  const _splitAtTopLevelOnlyJs = require("../util/splitAtTopLevelOnly.js");
30
30
  const _featureFlags = require("../featureFlags");
31
+ const _applyImportantSelector = require("../util/applyImportantSelector");
31
32
  function _interopRequireDefault(obj) {
32
33
  return obj && obj.__esModule ? obj : {
33
34
  default: obj
@@ -162,12 +163,12 @@ function applyImportant(matches, classCandidate) {
162
163
  ]
163
164
  });
164
165
  container.walkRules((r)=>{
165
- r.selector = (0, _pluginUtils.updateAllClasses)((0, _pluginUtils.filterSelectorsForClass)(r.selector, classCandidate), (className)=>{
166
- if (className === classCandidate) {
167
- return `!${className}`;
168
- }
169
- return className;
170
- });
166
+ let ast = (0, _postcssSelectorParser.default)().astSync(r.selector);
167
+ // Remove extraneous selectors that do not include the base candidate
168
+ ast.each((sel)=>(0, _formatVariantSelector.eliminateIrrelevantSelectors)(sel, classCandidate));
169
+ // Update all instances of the base candidate to include the important marker
170
+ (0, _pluginUtils.updateAllClasses)(ast, (className)=>className === classCandidate ? `!${className}` : className);
171
+ r.selector = ast.toString();
171
172
  r.walkDecls((d)=>d.important = true);
172
173
  });
173
174
  result.push([
@@ -235,18 +236,21 @@ function applyVariant(variant, matches, context) {
235
236
  }
236
237
  // Register arbitrary variants
237
238
  if (isArbitraryValue(variant) && !context.variantMap.has(variant)) {
239
+ let sort = context.offsets.recordVariant(variant);
238
240
  let selector = (0, _dataTypes.normalize)(variant.slice(1, -1));
239
- if (!(0, _setupContextUtils.isValidVariantFormatString)(selector)) {
241
+ let selectors = (0, _splitAtTopLevelOnlyJs.splitAtTopLevelOnly)(selector, ",");
242
+ // We do not support multiple selectors for arbitrary variants
243
+ if (selectors.length > 1) {
240
244
  return [];
241
245
  }
242
- let fn = (0, _setupContextUtils.parseVariant)(selector);
243
- let sort = context.offsets.recordVariant(variant);
244
- context.variantMap.set(variant, [
245
- [
246
- sort,
247
- fn
248
- ]
249
- ]);
246
+ if (!selectors.every(_setupContextUtils.isValidVariantFormatString)) {
247
+ return [];
248
+ }
249
+ let records = selectors.map((sel, idx)=>[
250
+ context.offsets.applyParallelOffset(sort, idx),
251
+ (0, _setupContextUtils.parseVariant)(sel.trim())
252
+ ]);
253
+ context.variantMap.set(variant, records);
250
254
  }
251
255
  if (context.variantMap.has(variant)) {
252
256
  let isArbitraryVariant = isArbitraryValue(variant);
@@ -820,7 +824,7 @@ function getImportantStrategy(important) {
820
824
  return;
821
825
  }
822
826
  rule.selectors = rule.selectors.map((selector)=>{
823
- return `${important} ${selector}`;
827
+ return (0, _applyImportantSelector.applyImportantSelector)(selector, important);
824
828
  });
825
829
  };
826
830
  }