tailwindcss 0.0.0-insiders.ecebde1 → 0.0.0-insiders.ed024ee

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 (85) hide show
  1. package/README.md +1 -2
  2. package/lib/cli/build/deps.js +62 -0
  3. package/lib/cli/build/index.js +0 -3
  4. package/lib/cli/build/plugin.js +60 -70
  5. package/lib/cli/build/watching.js +1 -1
  6. package/lib/cli/index.js +0 -1
  7. package/lib/cli-peer-dependencies.js +36 -0
  8. package/lib/corePluginList.js +4 -1
  9. package/lib/corePlugins.js +176 -45
  10. package/lib/css/preflight.css +20 -9
  11. package/lib/featureFlags.js +4 -6
  12. package/lib/lib/content.js +1 -27
  13. package/lib/lib/defaultExtractor.js +33 -25
  14. package/lib/lib/expandApplyAtRules.js +19 -0
  15. package/lib/lib/expandTailwindAtRules.js +23 -20
  16. package/lib/lib/generateRules.js +50 -22
  17. package/lib/lib/load-config.js +18 -3
  18. package/lib/lib/normalizeTailwindDirectives.js +15 -0
  19. package/lib/lib/offsets.js +51 -2
  20. package/lib/lib/resolveDefaultsAtRules.js +3 -1
  21. package/lib/lib/setupContextUtils.js +96 -43
  22. package/lib/plugin.js +3 -55
  23. package/lib/processTailwindFeatures.js +2 -4
  24. package/lib/util/cloneNodes.js +33 -13
  25. package/lib/util/color.js +1 -1
  26. package/lib/util/dataTypes.js +123 -12
  27. package/lib/util/formatVariantSelector.js +10 -3
  28. package/lib/util/isPlainObject.js +1 -1
  29. package/lib/util/log.js +0 -17
  30. package/lib/util/normalizeConfig.js +9 -21
  31. package/lib/util/pluginUtils.js +17 -2
  32. package/lib/util/prefixSelector.js +1 -1
  33. package/lib/util/pseudoElements.js +13 -30
  34. package/lib/util/validateConfig.js +0 -11
  35. package/nesting/index.d.ts +4 -0
  36. package/package.json +31 -28
  37. package/peers/index.js +96671 -0
  38. package/resolveConfig.d.ts +22 -3
  39. package/scripts/generate-types.js +1 -2
  40. package/src/cli/build/deps.js +56 -0
  41. package/src/cli/build/index.js +0 -4
  42. package/src/cli/build/plugin.js +53 -73
  43. package/src/cli/build/watching.js +1 -1
  44. package/src/cli/index.js +0 -1
  45. package/src/cli-peer-dependencies.js +15 -0
  46. package/src/corePluginList.js +1 -1
  47. package/src/corePlugins.js +161 -48
  48. package/src/css/preflight.css +20 -9
  49. package/src/featureFlags.js +2 -8
  50. package/src/lib/content.js +1 -33
  51. package/src/lib/defaultExtractor.js +30 -17
  52. package/src/lib/expandApplyAtRules.js +24 -0
  53. package/src/lib/expandTailwindAtRules.js +29 -32
  54. package/src/lib/generateRules.js +51 -23
  55. package/src/lib/load-config.ts +13 -0
  56. package/src/lib/normalizeTailwindDirectives.js +27 -0
  57. package/src/lib/offsets.js +61 -2
  58. package/src/lib/resolveDefaultsAtRules.js +5 -1
  59. package/src/lib/setupContextUtils.js +97 -44
  60. package/src/plugin.js +3 -63
  61. package/src/processTailwindFeatures.js +3 -5
  62. package/src/util/cloneNodes.js +35 -14
  63. package/src/util/color.js +1 -1
  64. package/src/util/dataTypes.js +129 -15
  65. package/src/util/formatVariantSelector.js +11 -3
  66. package/src/util/isPlainObject.js +1 -1
  67. package/src/util/log.js +0 -24
  68. package/src/util/normalizeConfig.js +10 -22
  69. package/src/util/pluginUtils.js +21 -1
  70. package/src/util/prefixSelector.js +1 -0
  71. package/src/util/pseudoElements.js +14 -13
  72. package/src/util/validateConfig.js +0 -10
  73. package/stubs/config.full.js +74 -15
  74. package/stubs/config.simple.js +1 -1
  75. package/stubs/postcss.config.cjs +1 -0
  76. package/stubs/postcss.config.js +1 -0
  77. package/types/config.d.ts +17 -9
  78. package/types/generated/corePluginList.d.ts +1 -1
  79. package/types/generated/default-theme.d.ts +34 -9
  80. package/types/index.d.ts +7 -3
  81. package/index.css +0 -5
  82. package/lib/lib/detectNesting.js +0 -45
  83. package/lib/lib/handleImportAtRules.js +0 -50
  84. package/src/lib/detectNesting.js +0 -47
  85. package/src/lib/handleImportAtRules.js +0 -34
@@ -35,6 +35,7 @@ const _parseBoxShadowValue = require("./util/parseBoxShadowValue");
35
35
  const _removeAlphaVariables = require("./util/removeAlphaVariables");
36
36
  const _featureFlags = require("./featureFlags");
37
37
  const _dataTypes = require("./util/dataTypes");
38
+ const _setupContextUtils = require("./lib/setupContextUtils");
38
39
  function _interop_require_default(obj) {
39
40
  return obj && obj.__esModule ? obj : {
40
41
  default: obj
@@ -80,6 +81,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
80
81
  return newObj;
81
82
  }
82
83
  let variantPlugins = {
84
+ childVariant: ({ addVariant })=>{
85
+ addVariant("*", "& > *");
86
+ },
83
87
  pseudoElementVariants: ({ addVariant })=>{
84
88
  addVariant("first-letter", "&::first-letter");
85
89
  addVariant("first-line", "&::first-line");
@@ -135,7 +139,7 @@ let variantPlugins = {
135
139
  return "&::after";
136
140
  });
137
141
  },
138
- pseudoClassVariants: ({ addVariant , matchVariant , config })=>{
142
+ pseudoClassVariants: ({ addVariant , matchVariant , config , prefix })=>{
139
143
  let pseudoVariants = [
140
144
  // Positional
141
145
  [
@@ -216,17 +220,17 @@ let variantPlugins = {
216
220
  }
217
221
  let variants = {
218
222
  group: (_, { modifier })=>modifier ? [
219
- `:merge(.group\\/${(0, _escapeClassName.default)(modifier)})`,
223
+ `:merge(${prefix(".group")}\\/${(0, _escapeClassName.default)(modifier)})`,
220
224
  " &"
221
225
  ] : [
222
- `:merge(.group)`,
226
+ `:merge(${prefix(".group")})`,
223
227
  " &"
224
228
  ],
225
229
  peer: (_, { modifier })=>modifier ? [
226
- `:merge(.peer\\/${(0, _escapeClassName.default)(modifier)})`,
230
+ `:merge(${prefix(".peer")}\\/${(0, _escapeClassName.default)(modifier)})`,
227
231
  " ~ &"
228
232
  ] : [
229
- `:merge(.peer)`,
233
+ `:merge(${prefix(".peer")})`,
230
234
  " ~ &"
231
235
  ]
232
236
  };
@@ -255,20 +259,23 @@ let variantPlugins = {
255
259
  // result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
256
260
  return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end);
257
261
  }, {
258
- values: Object.fromEntries(pseudoVariants)
262
+ values: Object.fromEntries(pseudoVariants),
263
+ [_setupContextUtils.INTERNAL_FEATURES]: {
264
+ respectPrefix: false
265
+ }
259
266
  });
260
267
  }
261
268
  },
262
269
  directionVariants: ({ addVariant })=>{
263
- addVariant("ltr", ':is([dir="ltr"] &)');
264
- addVariant("rtl", ':is([dir="rtl"] &)');
270
+ addVariant("ltr", '&:where([dir="ltr"], [dir="ltr"] *)');
271
+ addVariant("rtl", '&:where([dir="rtl"], [dir="rtl"] *)');
265
272
  },
266
273
  reducedMotionVariants: ({ addVariant })=>{
267
274
  addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)");
268
275
  addVariant("motion-reduce", "@media (prefers-reduced-motion: reduce)");
269
276
  },
270
277
  darkVariants: ({ config , addVariant })=>{
271
- let [mode, className = ".dark"] = [].concat(config("darkMode", "media"));
278
+ let [mode, selector = ".dark"] = [].concat(config("darkMode", "media"));
272
279
  if (mode === false) {
273
280
  mode = "media";
274
281
  _log.default.warn("darkmode-false", [
@@ -277,10 +284,48 @@ let variantPlugins = {
277
284
  "https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration"
278
285
  ]);
279
286
  }
280
- if (mode === "class") {
281
- addVariant("dark", `:is(${className} &)`);
287
+ if (mode === "variant") {
288
+ let formats;
289
+ if (Array.isArray(selector)) {
290
+ formats = selector;
291
+ } else if (typeof selector === "function") {
292
+ formats = selector;
293
+ } else if (typeof selector === "string") {
294
+ formats = [
295
+ selector
296
+ ];
297
+ }
298
+ // TODO: We could also add these warnings if the user passes a function that returns string | string[]
299
+ // But this is an advanced enough use case that it's probably not necessary
300
+ if (Array.isArray(formats)) {
301
+ for (let format of formats){
302
+ if (format === ".dark") {
303
+ mode = false;
304
+ _log.default.warn("darkmode-variant-without-selector", [
305
+ "When using `variant` for `darkMode`, you must provide a selector.",
306
+ 'Example: `darkMode: ["variant", ".your-selector &"]`'
307
+ ]);
308
+ } else if (!format.includes("&")) {
309
+ mode = false;
310
+ _log.default.warn("darkmode-variant-without-ampersand", [
311
+ "When using `variant` for `darkMode`, your selector must contain `&`.",
312
+ 'Example `darkMode: ["variant", ".your-selector &"]`'
313
+ ]);
314
+ }
315
+ }
316
+ }
317
+ selector = formats;
318
+ }
319
+ if (mode === "selector") {
320
+ // New preferred behavior
321
+ addVariant("dark", `&:where(${selector}, ${selector} *)`);
282
322
  } else if (mode === "media") {
283
323
  addVariant("dark", "@media (prefers-color-scheme: dark)");
324
+ } else if (mode === "variant") {
325
+ addVariant("dark", selector);
326
+ } else if (mode === "class") {
327
+ // Old behavior
328
+ addVariant("dark", `&:is(${selector} *)`);
284
329
  }
285
330
  },
286
331
  printVariant: ({ addVariant })=>{
@@ -415,15 +460,24 @@ let variantPlugins = {
415
460
  values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
416
461
  });
417
462
  },
418
- hasVariants: ({ matchVariant })=>{
463
+ hasVariants: ({ matchVariant , prefix })=>{
419
464
  matchVariant("has", (value)=>`&:has(${(0, _dataTypes.normalize)(value)})`, {
420
- values: {}
465
+ values: {},
466
+ [_setupContextUtils.INTERNAL_FEATURES]: {
467
+ respectPrefix: false
468
+ }
421
469
  });
422
- matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(.group):has(${(0, _dataTypes.normalize)(value)}) &`, {
423
- values: {}
470
+ matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(${prefix(".group")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(${prefix(".group")}):has(${(0, _dataTypes.normalize)(value)}) &`, {
471
+ values: {},
472
+ [_setupContextUtils.INTERNAL_FEATURES]: {
473
+ respectPrefix: false
474
+ }
424
475
  });
425
- matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(.peer):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
426
- values: {}
476
+ matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(${prefix(".peer")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(${prefix(".peer")}):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
477
+ values: {},
478
+ [_setupContextUtils.INTERNAL_FEATURES]: {
479
+ respectPrefix: false
480
+ }
427
481
  });
428
482
  },
429
483
  ariaVariants: ({ matchVariant , theme })=>{
@@ -461,6 +515,9 @@ let variantPlugins = {
461
515
  prefersContrastVariants: ({ addVariant })=>{
462
516
  addVariant("contrast-more", "@media (prefers-contrast: more)");
463
517
  addVariant("contrast-less", "@media (prefers-contrast: less)");
518
+ },
519
+ forcedColorsVariants: ({ addVariant })=>{
520
+ addVariant("forced-colors", "@media (forced-colors: active)");
464
521
  }
465
522
  };
466
523
  let cssTransformValue = [
@@ -746,7 +803,9 @@ let corePlugins = {
746
803
  "gridColumnStart"
747
804
  ]
748
805
  ]
749
- ]),
806
+ ], {
807
+ supportsNegativeValues: true
808
+ }),
750
809
  gridColumnEnd: (0, _createUtilityPlugin.default)("gridColumnEnd", [
751
810
  [
752
811
  "col-end",
@@ -754,7 +813,9 @@ let corePlugins = {
754
813
  "gridColumnEnd"
755
814
  ]
756
815
  ]
757
- ]),
816
+ ], {
817
+ supportsNegativeValues: true
818
+ }),
758
819
  gridRow: (0, _createUtilityPlugin.default)("gridRow", [
759
820
  [
760
821
  "row",
@@ -770,7 +831,9 @@ let corePlugins = {
770
831
  "gridRowStart"
771
832
  ]
772
833
  ]
773
- ]),
834
+ ], {
835
+ supportsNegativeValues: true
836
+ }),
774
837
  gridRowEnd: (0, _createUtilityPlugin.default)("gridRowEnd", [
775
838
  [
776
839
  "row-end",
@@ -778,9 +841,17 @@ let corePlugins = {
778
841
  "gridRowEnd"
779
842
  ]
780
843
  ]
781
- ]),
844
+ ], {
845
+ supportsNegativeValues: true
846
+ }),
782
847
  float: ({ addUtilities })=>{
783
848
  addUtilities({
849
+ ".float-start": {
850
+ float: "inline-start"
851
+ },
852
+ ".float-end": {
853
+ float: "inline-end"
854
+ },
784
855
  ".float-right": {
785
856
  float: "right"
786
857
  },
@@ -794,6 +865,12 @@ let corePlugins = {
794
865
  },
795
866
  clear: ({ addUtilities })=>{
796
867
  addUtilities({
868
+ ".clear-start": {
869
+ clear: "inline-start"
870
+ },
871
+ ".clear-end": {
872
+ clear: "inline-end"
873
+ },
797
874
  ".clear-left": {
798
875
  clear: "left"
799
876
  },
@@ -977,6 +1054,15 @@ let corePlugins = {
977
1054
  ]
978
1055
  ]
979
1056
  ]),
1057
+ size: (0, _createUtilityPlugin.default)("size", [
1058
+ [
1059
+ "size",
1060
+ [
1061
+ "width",
1062
+ "height"
1063
+ ]
1064
+ ]
1065
+ ]),
980
1066
  height: (0, _createUtilityPlugin.default)("height", [
981
1067
  [
982
1068
  "h",
@@ -1294,7 +1380,7 @@ let corePlugins = {
1294
1380
  });
1295
1381
  },
1296
1382
  animation: ({ matchUtilities , theme , config })=>{
1297
- let prefixName = (name)=>`${config("prefix")}${(0, _escapeClassName.default)(name)}`;
1383
+ let prefixName = (name)=>(0, _escapeClassName.default)(config("prefix") + name);
1298
1384
  var _theme;
1299
1385
  let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
1300
1386
  return [
@@ -1620,6 +1706,9 @@ let corePlugins = {
1620
1706
  addUtilities({
1621
1707
  ".appearance-none": {
1622
1708
  appearance: "none"
1709
+ },
1710
+ ".appearance-auto": {
1711
+ appearance: "auto"
1623
1712
  }
1624
1713
  });
1625
1714
  },
@@ -1946,19 +2035,10 @@ let corePlugins = {
1946
2035
  ]
1947
2036
  ]
1948
2037
  ]),
1949
- space: ({ matchUtilities , addUtilities , theme , config })=>{
2038
+ space: ({ matchUtilities , addUtilities , theme })=>{
1950
2039
  matchUtilities({
1951
2040
  "space-x": (value)=>{
1952
2041
  value = value === "0" ? "0px" : value;
1953
- if ((0, _featureFlags.flagEnabled)(config(), "logicalSiblingUtilities")) {
1954
- return {
1955
- "& > :not([hidden]) ~ :not([hidden])": {
1956
- "--tw-space-x-reverse": "0",
1957
- "margin-inline-end": `calc(${value} * var(--tw-space-x-reverse))`,
1958
- "margin-inline-start": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
1959
- }
1960
- };
1961
- }
1962
2042
  return {
1963
2043
  "& > :not([hidden]) ~ :not([hidden])": {
1964
2044
  "--tw-space-x-reverse": "0",
@@ -1990,20 +2070,10 @@ let corePlugins = {
1990
2070
  }
1991
2071
  });
1992
2072
  },
1993
- divideWidth: ({ matchUtilities , addUtilities , theme , config })=>{
2073
+ divideWidth: ({ matchUtilities , addUtilities , theme })=>{
1994
2074
  matchUtilities({
1995
2075
  "divide-x": (value)=>{
1996
2076
  value = value === "0" ? "0px" : value;
1997
- if ((0, _featureFlags.flagEnabled)(config(), "logicalSiblingUtilities")) {
1998
- return {
1999
- "& > :not([hidden]) ~ :not([hidden])": {
2000
- "@defaults border-width": {},
2001
- "--tw-divide-x-reverse": "0",
2002
- "border-inline-end-width": `calc(${value} * var(--tw-divide-x-reverse))`,
2003
- "border-inline-start-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
2004
- }
2005
- };
2006
- }
2007
2077
  return {
2008
2078
  "& > :not([hidden]) ~ :not([hidden])": {
2009
2079
  "@defaults border-width": {},
@@ -2314,6 +2384,9 @@ let corePlugins = {
2314
2384
  },
2315
2385
  ".text-balance": {
2316
2386
  "text-wrap": "balance"
2387
+ },
2388
+ ".text-pretty": {
2389
+ "text-wrap": "pretty"
2317
2390
  }
2318
2391
  });
2319
2392
  },
@@ -3617,6 +3690,9 @@ let corePlugins = {
3617
3690
  ".mix-blend-luminosity": {
3618
3691
  "mix-blend-mode": "luminosity"
3619
3692
  },
3693
+ ".mix-blend-plus-darker": {
3694
+ "mix-blend-mode": "plus-darker"
3695
+ },
3620
3696
  ".mix-blend-plus-lighter": {
3621
3697
  "mix-blend-mode": "plus-lighter"
3622
3698
  }
@@ -3630,7 +3706,7 @@ let corePlugins = {
3630
3706
  `var(--tw-shadow)`
3631
3707
  ].join(", ");
3632
3708
  return function({ matchUtilities , addDefaults , theme }) {
3633
- addDefaults(" box-shadow", {
3709
+ addDefaults("box-shadow", {
3634
3710
  "--tw-ring-offset-shadow": "0 0 #0000",
3635
3711
  "--tw-ring-shadow": "0 0 #0000",
3636
3712
  "--tw-shadow": "0 0 #0000",
@@ -4182,6 +4258,51 @@ let corePlugins = {
4182
4258
  ]
4183
4259
  ]
4184
4260
  ]),
4261
+ contain: ({ addDefaults , addUtilities })=>{
4262
+ let cssContainValue = "var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)";
4263
+ addDefaults("contain", {
4264
+ "--tw-contain-size": " ",
4265
+ "--tw-contain-layout": " ",
4266
+ "--tw-contain-paint": " ",
4267
+ "--tw-contain-style": " "
4268
+ });
4269
+ addUtilities({
4270
+ ".contain-none": {
4271
+ contain: "none"
4272
+ },
4273
+ ".contain-content": {
4274
+ contain: "content"
4275
+ },
4276
+ ".contain-strict": {
4277
+ contain: "strict"
4278
+ },
4279
+ ".contain-size": {
4280
+ "@defaults contain": {},
4281
+ "--tw-contain-size": "size",
4282
+ contain: cssContainValue
4283
+ },
4284
+ ".contain-inline-size": {
4285
+ "@defaults contain": {},
4286
+ "--tw-contain-size": "inline-size",
4287
+ contain: cssContainValue
4288
+ },
4289
+ ".contain-layout": {
4290
+ "@defaults contain": {},
4291
+ "--tw-contain-layout": "layout",
4292
+ contain: cssContainValue
4293
+ },
4294
+ ".contain-paint": {
4295
+ "@defaults contain": {},
4296
+ "--tw-contain-paint": "paint",
4297
+ contain: cssContainValue
4298
+ },
4299
+ ".contain-style": {
4300
+ "@defaults contain": {},
4301
+ "--tw-contain-style": "style",
4302
+ contain: cssContainValue
4303
+ }
4304
+ });
4305
+ },
4185
4306
  content: (0, _createUtilityPlugin.default)("content", [
4186
4307
  [
4187
4308
  "content",
@@ -4193,5 +4314,15 @@ let corePlugins = {
4193
4314
  ]
4194
4315
  ]
4195
4316
  ]
4196
- ])
4317
+ ]),
4318
+ forcedColorAdjust: ({ addUtilities })=>{
4319
+ addUtilities({
4320
+ ".forced-color-adjust-auto": {
4321
+ "forced-color-adjust": "auto"
4322
+ },
4323
+ ".forced-color-adjust-none": {
4324
+ "forced-color-adjust": "none"
4325
+ }
4326
+ });
4327
+ }
4197
4328
  };
@@ -24,16 +24,19 @@
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
26
  6. Use the user's configured `sans` font-variation-settings by default.
27
+ 7. Disable tap highlights on iOS
27
28
  */
28
29
 
29
- html {
30
+ html,
31
+ :host {
30
32
  line-height: 1.5; /* 1 */
31
33
  -webkit-text-size-adjust: 100%; /* 2 */
32
34
  -moz-tab-size: 4; /* 3 */
33
35
  tab-size: 4; /* 3 */
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 */
36
+ font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
35
37
  font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
36
38
  font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
39
+ -webkit-tap-highlight-color: transparent; /* 7 */
37
40
  }
38
41
 
39
42
  /*
@@ -99,8 +102,10 @@ strong {
99
102
  }
100
103
 
101
104
  /*
102
- 1. Use the user's configured `mono` font family by default.
103
- 2. Correct the odd `em` font sizing in all browsers.
105
+ 1. Use the user's configured `mono` font-family by default.
106
+ 2. Use the user's configured `mono` font-feature-settings by default.
107
+ 3. Use the user's configured `mono` font-variation-settings by default.
108
+ 4. Correct the odd `em` font sizing in all browsers.
104
109
  */
105
110
 
106
111
  code,
@@ -108,7 +113,9 @@ kbd,
108
113
  samp,
109
114
  pre {
110
115
  font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
111
- font-size: 1em; /* 2 */
116
+ font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */
117
+ font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */
118
+ font-size: 1em; /* 4 */
112
119
  }
113
120
 
114
121
  /*
@@ -168,6 +175,7 @@ textarea {
168
175
  font-size: 100%; /* 1 */
169
176
  font-weight: inherit; /* 1 */
170
177
  line-height: inherit; /* 1 */
178
+ letter-spacing: inherit; /* 1 */
171
179
  color: inherit; /* 1 */
172
180
  margin: 0; /* 2 */
173
181
  padding: 0; /* 3 */
@@ -188,9 +196,9 @@ select {
188
196
  */
189
197
 
190
198
  button,
191
- [type='button'],
192
- [type='reset'],
193
- [type='submit'] {
199
+ input:where([type='button']),
200
+ input:where([type='reset']),
201
+ input:where([type='submit']) {
194
202
  -webkit-appearance: button; /* 1 */
195
203
  background-color: transparent; /* 2 */
196
204
  background-image: none; /* 2 */
@@ -266,7 +274,7 @@ summary {
266
274
  }
267
275
 
268
276
  /*
269
- Removes the default spacing for appropriate elements.
277
+ Removes the default spacing and border for appropriate elements.
270
278
  */
271
279
 
272
280
  blockquote,
@@ -302,6 +310,9 @@ menu {
302
310
  padding: 0;
303
311
  }
304
312
 
313
+ /*
314
+ Reset default styling for dialogs.
315
+ */
305
316
  dialog {
306
317
  padding: 0;
307
318
  }
@@ -28,22 +28,20 @@ function _interop_require_default(obj) {
28
28
  }
29
29
  let defaults = {
30
30
  optimizeUniversalDefaults: false,
31
+ generalizedModifiers: true,
31
32
  disableColorOpacityUtilitiesByDefault: false,
32
- relativeContentPathsByDefault: false,
33
- oxideParser: false,
34
- logicalSiblingUtilities: false
33
+ relativeContentPathsByDefault: false
35
34
  };
36
35
  let featureFlags = {
37
36
  future: [
38
37
  "hoverOnlyWhenSupported",
39
38
  "respectDefaultRingColorOpacity",
40
39
  "disableColorOpacityUtilitiesByDefault",
41
- "relativeContentPathsByDefault",
42
- "logicalSiblingUtilities"
40
+ "relativeContentPathsByDefault"
43
41
  ],
44
42
  experimental: [
45
43
  "optimizeUniversalDefaults",
46
- "oxideParser"
44
+ "generalizedModifiers"
47
45
  ]
48
46
  };
49
47
  function flagEnabled(config, flag) {
@@ -24,39 +24,13 @@ const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob"));
24
24
  const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path"));
25
25
  const _parseGlob = require("../util/parseGlob");
26
26
  const _sharedState = require("./sharedState");
27
- const _oxide = require("@tailwindcss/oxide");
28
27
  function _interop_require_default(obj) {
29
28
  return obj && obj.__esModule ? obj : {
30
29
  default: obj
31
30
  };
32
31
  }
33
- /** @typedef {import('../../types/config.js').RawFile} RawFile */ /** @typedef {import('../../types/config.js').FilePath} FilePath */ /*
34
- * @param {import('tailwindcss').Config} tailwindConfig
35
- * @param {{skip:string[]}} options
36
- * @returns {ContentPath[]}
37
- */ function resolveContentFiles(tailwindConfig, { skip =[] } = {}) {
38
- if (Array.isArray(tailwindConfig.content.files) && tailwindConfig.content.files.includes("auto")) {
39
- let idx = tailwindConfig.content.files.indexOf("auto");
40
- if (idx !== -1) {
41
- _sharedState.env.DEBUG && console.time("Calculating resolve content paths");
42
- let resolved = (0, _oxide.resolveContentPaths)({
43
- base: process.cwd()
44
- });
45
- _sharedState.env.DEBUG && console.timeEnd("Calculating resolve content paths");
46
- tailwindConfig.content.files.splice(idx, 1, ...resolved);
47
- }
48
- }
49
- if (skip.length > 0) {
50
- tailwindConfig.content.files = tailwindConfig.content.files.filter((filePath)=>!skip.includes(filePath));
51
- }
52
- return tailwindConfig.content.files;
53
- }
54
32
  function parseCandidateFiles(context, tailwindConfig) {
55
- let files = resolveContentFiles(tailwindConfig, {
56
- skip: [
57
- context.userConfigPath
58
- ]
59
- });
33
+ let files = tailwindConfig.content.files;
60
34
  // Normalize the file globs
61
35
  files = files.filter((filePath)=>typeof filePath === "string");
62
36
  files = files.map(_normalizepath.default);
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "defaultExtractor", {
8
8
  return defaultExtractor;
9
9
  }
10
10
  });
11
- const _featureFlags = require("../featureFlags");
12
11
  const _regex = /*#__PURE__*/ _interop_require_wildcard(require("./regex"));
13
12
  function _getRequireWildcardCache(nodeInterop) {
14
13
  if (typeof WeakMap !== "function") return null;
@@ -57,17 +56,15 @@ function defaultExtractor(context) {
57
56
  /** @type {(string|string)[]} */ let results = [];
58
57
  for (let pattern of patterns){
59
58
  var _content_match;
60
- results = [
61
- ...results,
62
- ...(_content_match = content.match(pattern)) !== null && _content_match !== void 0 ? _content_match : []
63
- ];
59
+ for (let result of (_content_match = content.match(pattern)) !== null && _content_match !== void 0 ? _content_match : []){
60
+ results.push(clipAtBalancedParens(result));
61
+ }
64
62
  }
65
- return results.filter((v)=>v !== undefined).map(clipAtBalancedParens);
63
+ return results;
66
64
  };
67
65
  }
68
66
  function* buildRegExps(context) {
69
67
  let separator = context.tailwindConfig.separator;
70
- let variantGroupingEnabled = (0, _featureFlags.flagEnabled)(context.tailwindConfig, "variantGrouping");
71
68
  let prefix = context.tailwindConfig.prefix !== "" ? _regex.optional(_regex.pattern([
72
69
  /-?/,
73
70
  _regex.escape(context.tailwindConfig.prefix)
@@ -79,16 +76,25 @@ function* buildRegExps(context) {
79
76
  // This is a targeted fix to continue to allow theme()
80
77
  // with square brackets to work in arbitrary properties
81
78
  // while fixing a problem with the regex matching too much
82
- /\[[^\s:'"`]+:[^\s]+?\[[^\s]+\][^\s]+?\]/,
79
+ /\[[^\s:'"`\]]+:[^\s]+?\[[^\s]+\][^\s]+?\]/,
83
80
  // Utilities
84
81
  _regex.pattern([
85
82
  // Utility Name / Group Name
86
- /-?(?:\w+)/,
83
+ _regex.any([
84
+ /-?(?:\w+)/,
85
+ // This is here to make sure @container supports everything that other utilities do
86
+ /@(?:\w+)/
87
+ ]),
87
88
  // Normal/Arbitrary values
88
89
  _regex.optional(_regex.any([
89
90
  _regex.pattern([
90
91
  // Arbitrary values
91
- /-(?:\w+-)*\[[^\s:]+\]/,
92
+ _regex.any([
93
+ /-(?:\w+-)*\['[^\s]+'\]/,
94
+ /-(?:\w+-)*\["[^\s]+"\]/,
95
+ /-(?:\w+-)*\[`[^\s]+`\]/,
96
+ /-(?:\w+-)*\[(?:[^\s\[\]]+\[[^\s\[\]]+\])*[^\s:\[\]]+\]/
97
+ ]),
92
98
  // Not immediately followed by an `{[(`
93
99
  /(?![{([]])/,
94
100
  // optionally followed by an opacity modifier
@@ -96,7 +102,12 @@ function* buildRegExps(context) {
96
102
  ]),
97
103
  _regex.pattern([
98
104
  // Arbitrary values
99
- /-(?:\w+-)*\[[^\s]+\]/,
105
+ _regex.any([
106
+ /-(?:\w+-)*\['[^\s]+'\]/,
107
+ /-(?:\w+-)*\["[^\s]+"\]/,
108
+ /-(?:\w+-)*\[`[^\s]+`\]/,
109
+ /-(?:\w+-)*\[(?:[^\s\[\]]+\[[^\s\[\]]+\])*[^\s\[\]]+\]/
110
+ ]),
100
111
  // Not immediately followed by an `{[(`
101
112
  /(?![{([]])/,
102
113
  // optionally followed by an opacity modifier
@@ -115,6 +126,11 @@ function* buildRegExps(context) {
115
126
  /@\[[^\s"'`]+\](\/[^\s"'`]+)?/,
116
127
  separator
117
128
  ]),
129
+ // With variant modifier (e.g.: group-[..]/modifier)
130
+ _regex.pattern([
131
+ /([^\s"'`\[\\]+-)?\[[^\s"'`]+\]\/[\w_-]+/,
132
+ separator
133
+ ]),
118
134
  _regex.pattern([
119
135
  /([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/,
120
136
  separator
@@ -126,6 +142,11 @@ function* buildRegExps(context) {
126
142
  ]),
127
143
  // With quotes allowed
128
144
  _regex.any([
145
+ // With variant modifier (e.g.: group-[..]/modifier)
146
+ _regex.pattern([
147
+ /([^\s"'`\[\\]+-)?\[[^\s`]+\]\/[\w_-]+/,
148
+ separator
149
+ ]),
129
150
  _regex.pattern([
130
151
  /([^\s"'`\[\\]+-)?\[[^\s`]+\]/,
131
152
  separator
@@ -145,20 +166,7 @@ function* buildRegExps(context) {
145
166
  // Important (optional)
146
167
  /!?/,
147
168
  prefix,
148
- variantGroupingEnabled ? _regex.any([
149
- // Or any of those things but grouped separated by commas
150
- _regex.pattern([
151
- /\(/,
152
- utility,
153
- _regex.zeroOrMore([
154
- /,/,
155
- utility
156
- ]),
157
- /\)/
158
- ]),
159
- // Arbitrary properties, constrained utilities, arbitrary values, etc…
160
- utility
161
- ]) : utility
169
+ utility
162
170
  ]);
163
171
  }
164
172
  // 5. Inner matches