tailwindcss 0.0.0-insiders.f49b054 → 0.0.0-insiders.f5408d6

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 (78) hide show
  1. package/lib/cli/build/plugin.js +11 -16
  2. package/lib/cli/build/watching.js +1 -1
  3. package/lib/cli/init/index.js +0 -4
  4. package/lib/corePluginList.js +5 -1
  5. package/lib/corePlugins.js +170 -13
  6. package/lib/css/preflight.css +19 -9
  7. package/lib/lib/content.js +35 -23
  8. package/lib/lib/defaultExtractor.js +33 -25
  9. package/lib/lib/expandApplyAtRules.js +6 -0
  10. package/lib/lib/expandTailwindAtRules.js +23 -6
  11. package/lib/lib/generateRules.js +47 -25
  12. package/lib/lib/load-config.js +14 -3
  13. package/lib/lib/normalizeTailwindDirectives.js +13 -15
  14. package/lib/lib/offsets.js +51 -2
  15. package/lib/lib/resolveDefaultsAtRules.js +3 -1
  16. package/lib/lib/setupContextUtils.js +76 -37
  17. package/lib/lib/setupTrackingContext.js +2 -1
  18. package/lib/oxide/cli/build/plugin.js +44 -23
  19. package/lib/oxide/cli/init/index.js +0 -4
  20. package/lib/plugin.js +3 -5
  21. package/lib/processTailwindFeatures.js +2 -2
  22. package/lib/util/cloneNodes.js +33 -13
  23. package/lib/util/color.js +1 -1
  24. package/lib/util/dataTypes.js +122 -11
  25. package/lib/util/formatVariantSelector.js +10 -3
  26. package/lib/util/getAllConfigs.js +1 -3
  27. package/lib/util/isPlainObject.js +1 -1
  28. package/lib/util/normalizeConfig.js +8 -30
  29. package/lib/util/pluginUtils.js +13 -0
  30. package/lib/util/prefixSelector.js +1 -1
  31. package/lib/util/pseudoElements.js +13 -30
  32. package/lib/util/validateConfig.js +1 -7
  33. package/nesting/index.d.ts +4 -0
  34. package/package.json +5 -5
  35. package/peers/index.js +701 -617
  36. package/resolveConfig.d.ts +22 -3
  37. package/scripts/generate-types.js +1 -2
  38. package/src/cli/build/plugin.js +7 -14
  39. package/src/cli/build/watching.js +1 -1
  40. package/src/cli/init/index.js +0 -5
  41. package/src/corePluginList.js +1 -1
  42. package/src/corePlugins.js +149 -12
  43. package/src/css/preflight.css +19 -9
  44. package/src/featureFlags.js +1 -5
  45. package/src/lib/content.js +43 -29
  46. package/src/lib/defaultExtractor.js +30 -17
  47. package/src/lib/expandApplyAtRules.js +7 -0
  48. package/src/lib/expandTailwindAtRules.js +23 -6
  49. package/src/lib/generateRules.js +50 -26
  50. package/src/lib/load-config.ts +8 -0
  51. package/src/lib/normalizeTailwindDirectives.js +24 -26
  52. package/src/lib/offsets.js +61 -2
  53. package/src/lib/resolveDefaultsAtRules.js +5 -1
  54. package/src/lib/setupContextUtils.js +77 -38
  55. package/src/lib/setupTrackingContext.js +1 -3
  56. package/src/oxide/cli/build/plugin.ts +41 -18
  57. package/src/oxide/cli/init/index.ts +0 -5
  58. package/src/plugin.js +3 -5
  59. package/src/processTailwindFeatures.js +3 -2
  60. package/src/util/cloneNodes.js +35 -14
  61. package/src/util/color.js +1 -1
  62. package/src/util/dataTypes.js +128 -14
  63. package/src/util/formatVariantSelector.js +11 -3
  64. package/src/util/getAllConfigs.js +1 -8
  65. package/src/util/isPlainObject.js +1 -1
  66. package/src/util/normalizeConfig.js +17 -51
  67. package/src/util/pluginUtils.js +16 -0
  68. package/src/util/prefixSelector.js +1 -0
  69. package/src/util/pseudoElements.js +14 -13
  70. package/src/util/validateConfig.js +1 -8
  71. package/stubs/config.full.js +85 -14
  72. package/types/config.d.ts +17 -9
  73. package/types/generated/corePluginList.d.ts +1 -1
  74. package/types/generated/default-theme.d.ts +34 -9
  75. package/types/index.d.ts +7 -3
  76. package/index.css +0 -5
  77. package/lib/lib/handleImportAtRules.js +0 -49
  78. package/src/lib/handleImportAtRules.js +0 -33
@@ -29,7 +29,6 @@ const _findAtConfigPath = require("../../lib/findAtConfigPath.js");
29
29
  const _log = /*#__PURE__*/ _interop_require_default(require("../../util/log"));
30
30
  const _loadconfig = require("../../lib/load-config");
31
31
  const _getModuleDependencies = /*#__PURE__*/ _interop_require_default(require("../../lib/getModuleDependencies"));
32
- const _validateConfig = require("../../util/validateConfig");
33
32
  function _interop_require_default(obj) {
34
33
  return obj && obj.__esModule ? obj : {
35
34
  default: obj
@@ -145,15 +144,11 @@ let state = {
145
144
  }
146
145
  };
147
146
  // @ts-ignore
148
- if (false) {
149
- this.configBag.config = (0, _validateConfig.validateConfig)((0, _resolveConfig.default)(this.configBag.config));
150
- } else {
151
- this.configBag.config = (0, _validateConfig.validateConfig)((0, _resolveConfig.default)(this.configBag.config, {
152
- content: {
153
- files: []
154
- }
155
- }));
156
- }
147
+ this.configBag.config = (0, _resolveConfig.default)(this.configBag.config, {
148
+ content: {
149
+ files: []
150
+ }
151
+ });
157
152
  // Override content files if `--content` has been passed explicitly
158
153
  if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
159
154
  this.configBag.config.content.files = content;
@@ -197,14 +192,14 @@ let state = {
197
192
  return content;
198
193
  },
199
194
  getContext ({ createContext , cliConfigPath , root , result , content }) {
200
- if (this.context) {
201
- this.context.changedContent = this.changedContent.splice(0);
202
- return this.context;
203
- }
204
195
  _sharedState.env.DEBUG && console.time("Searching for config");
205
196
  var _findAtConfigPath1;
206
197
  let configPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : cliConfigPath;
207
198
  _sharedState.env.DEBUG && console.timeEnd("Searching for config");
199
+ if (this.context) {
200
+ this.context.changedContent = this.changedContent.splice(0);
201
+ return this.context;
202
+ }
208
203
  _sharedState.env.DEBUG && console.time("Loading config");
209
204
  let config = this.loadConfig(configPath, content);
210
205
  _sharedState.env.DEBUG && console.timeEnd("Loading config");
@@ -250,9 +245,9 @@ async function createProcessor(args, cliConfigPath) {
250
245
  let tailwindPlugin = ()=>{
251
246
  return {
252
247
  postcssPlugin: "tailwindcss",
253
- Once (root, { result }) {
248
+ async Once (root, { result }) {
254
249
  _sharedState.env.DEBUG && console.time("Compiling CSS");
255
- (0, _processTailwindFeatures.default)(({ createContext })=>{
250
+ await (0, _processTailwindFeatures.default)(({ createContext })=>{
256
251
  console.error();
257
252
  console.error("Rebuilding...");
258
253
  return ()=>{
@@ -126,7 +126,7 @@ function createWatcher(args, { state , rebuild }) {
126
126
  // This is very likely a chokidar bug but it's one we need to work around
127
127
  // We treat this as a change event and rebuild the CSS
128
128
  watcher.on("raw", (evt, filePath, meta)=>{
129
- if (evt !== "rename") {
129
+ if (evt !== "rename" || filePath === null) {
130
130
  return;
131
131
  }
132
132
  let watchedPath = meta.watchedPath;
@@ -37,10 +37,6 @@ function init(args) {
37
37
  } else {
38
38
  let stubContentsFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../../../stubs/config.full.js") : _path.default.resolve(__dirname, "../../../stubs/config.simple.js"), "utf8");
39
39
  let stubFile = _fs.default.readFileSync(_path.default.resolve(__dirname, `../../../stubs/tailwind.config.${syntax}`), "utf8");
40
- // Drop `content` in the oxide engine to promote auto content
41
- if (false) {
42
- stubContentsFile = stubContentsFile.replace(/ *content: \[\],\n/, "");
43
- }
44
40
  // Change colors import
45
41
  stubContentsFile = stubContentsFile.replace("../colors", "tailwindcss/colors");
46
42
  // Replace contents of {ts,js,cjs} file with the stub {simple,full}.
@@ -32,6 +32,7 @@ const _default = [
32
32
  "lineClamp",
33
33
  "display",
34
34
  "aspectRatio",
35
+ "size",
35
36
  "height",
36
37
  "maxHeight",
37
38
  "minHeight",
@@ -98,6 +99,7 @@ const _default = [
98
99
  "textOverflow",
99
100
  "hyphens",
100
101
  "whitespace",
102
+ "textWrap",
101
103
  "wordBreak",
102
104
  "borderRadius",
103
105
  "borderWidth",
@@ -183,5 +185,7 @@ const _default = [
183
185
  "transitionDuration",
184
186
  "transitionTimingFunction",
185
187
  "willChange",
186
- "content"
188
+ "contain",
189
+ "content",
190
+ "forcedColorAdjust"
187
191
  ];
@@ -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,6 +460,17 @@ let variantPlugins = {
415
460
  values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
416
461
  });
417
462
  },
463
+ hasVariants: ({ matchVariant })=>{
464
+ matchVariant("has", (value)=>`&:has(${(0, _dataTypes.normalize)(value)})`, {
465
+ values: {}
466
+ });
467
+ matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(.group):has(${(0, _dataTypes.normalize)(value)}) &`, {
468
+ values: {}
469
+ });
470
+ matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(.peer):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
471
+ values: {}
472
+ });
473
+ },
418
474
  ariaVariants: ({ matchVariant , theme })=>{
419
475
  var _theme;
420
476
  matchVariant("aria", (value)=>`&[aria-${(0, _dataTypes.normalize)(value)}]`, {
@@ -450,6 +506,9 @@ let variantPlugins = {
450
506
  prefersContrastVariants: ({ addVariant })=>{
451
507
  addVariant("contrast-more", "@media (prefers-contrast: more)");
452
508
  addVariant("contrast-less", "@media (prefers-contrast: less)");
509
+ },
510
+ forcedColorsVariants: ({ addVariant })=>{
511
+ addVariant("forced-colors", "@media (forced-colors: active)");
453
512
  }
454
513
  };
455
514
  let cssTransformValue = [
@@ -770,6 +829,12 @@ let corePlugins = {
770
829
  ]),
771
830
  float: ({ addUtilities })=>{
772
831
  addUtilities({
832
+ ".float-start": {
833
+ float: "inline-start"
834
+ },
835
+ ".float-end": {
836
+ float: "inline-end"
837
+ },
773
838
  ".float-right": {
774
839
  float: "right"
775
840
  },
@@ -783,6 +848,12 @@ let corePlugins = {
783
848
  },
784
849
  clear: ({ addUtilities })=>{
785
850
  addUtilities({
851
+ ".clear-start": {
852
+ clear: "inline-start"
853
+ },
854
+ ".clear-end": {
855
+ clear: "inline-end"
856
+ },
786
857
  ".clear-left": {
787
858
  clear: "left"
788
859
  },
@@ -966,6 +1037,15 @@ let corePlugins = {
966
1037
  ]
967
1038
  ]
968
1039
  ]),
1040
+ size: (0, _createUtilityPlugin.default)("size", [
1041
+ [
1042
+ "size",
1043
+ [
1044
+ "width",
1045
+ "height"
1046
+ ]
1047
+ ]
1048
+ ]),
969
1049
  height: (0, _createUtilityPlugin.default)("height", [
970
1050
  [
971
1051
  "h",
@@ -1283,7 +1363,7 @@ let corePlugins = {
1283
1363
  });
1284
1364
  },
1285
1365
  animation: ({ matchUtilities , theme , config })=>{
1286
- let prefixName = (name)=>`${config("prefix")}${(0, _escapeClassName.default)(name)}`;
1366
+ let prefixName = (name)=>(0, _escapeClassName.default)(config("prefix") + name);
1287
1367
  var _theme;
1288
1368
  let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
1289
1369
  return [
@@ -1609,6 +1689,9 @@ let corePlugins = {
1609
1689
  addUtilities({
1610
1690
  ".appearance-none": {
1611
1691
  appearance: "none"
1692
+ },
1693
+ ".appearance-auto": {
1694
+ appearance: "auto"
1612
1695
  }
1613
1696
  });
1614
1697
  },
@@ -2293,6 +2376,22 @@ let corePlugins = {
2293
2376
  }
2294
2377
  });
2295
2378
  },
2379
+ textWrap: ({ addUtilities })=>{
2380
+ addUtilities({
2381
+ ".text-wrap": {
2382
+ "text-wrap": "wrap"
2383
+ },
2384
+ ".text-nowrap": {
2385
+ "text-wrap": "nowrap"
2386
+ },
2387
+ ".text-balance": {
2388
+ "text-wrap": "balance"
2389
+ },
2390
+ ".text-pretty": {
2391
+ "text-wrap": "pretty"
2392
+ }
2393
+ });
2394
+ },
2296
2395
  wordBreak: ({ addUtilities })=>{
2297
2396
  addUtilities({
2298
2397
  ".break-normal": {
@@ -3593,6 +3692,9 @@ let corePlugins = {
3593
3692
  ".mix-blend-luminosity": {
3594
3693
  "mix-blend-mode": "luminosity"
3595
3694
  },
3695
+ ".mix-blend-plus-darker": {
3696
+ "mix-blend-mode": "plus-darker"
3697
+ },
3596
3698
  ".mix-blend-plus-lighter": {
3597
3699
  "mix-blend-mode": "plus-lighter"
3598
3700
  }
@@ -4158,6 +4260,51 @@ let corePlugins = {
4158
4260
  ]
4159
4261
  ]
4160
4262
  ]),
4263
+ contain: ({ addDefaults , addUtilities })=>{
4264
+ let cssContainValue = "var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)";
4265
+ addDefaults("contain", {
4266
+ "--tw-contain-size": " ",
4267
+ "--tw-contain-layout": " ",
4268
+ "--tw-contain-paint": " ",
4269
+ "--tw-contain-style": " "
4270
+ });
4271
+ addUtilities({
4272
+ ".contain-none": {
4273
+ contain: "none"
4274
+ },
4275
+ ".contain-content": {
4276
+ contain: "content"
4277
+ },
4278
+ ".contain-strict": {
4279
+ contain: "strict"
4280
+ },
4281
+ ".contain-size": {
4282
+ "@defaults contain": {},
4283
+ "--tw-contain-size": "size",
4284
+ contain: cssContainValue
4285
+ },
4286
+ ".contain-inline-size": {
4287
+ "@defaults contain": {},
4288
+ "--tw-contain-size": "inline-size",
4289
+ contain: cssContainValue
4290
+ },
4291
+ ".contain-layout": {
4292
+ "@defaults contain": {},
4293
+ "--tw-contain-layout": "layout",
4294
+ contain: cssContainValue
4295
+ },
4296
+ ".contain-paint": {
4297
+ "@defaults contain": {},
4298
+ "--tw-contain-paint": "paint",
4299
+ contain: cssContainValue
4300
+ },
4301
+ ".contain-style": {
4302
+ "@defaults contain": {},
4303
+ "--tw-contain-style": "style",
4304
+ contain: cssContainValue
4305
+ }
4306
+ });
4307
+ },
4161
4308
  content: (0, _createUtilityPlugin.default)("content", [
4162
4309
  [
4163
4310
  "content",
@@ -4169,5 +4316,15 @@ let corePlugins = {
4169
4316
  ]
4170
4317
  ]
4171
4318
  ]
4172
- ])
4319
+ ]),
4320
+ forcedColorAdjust: ({ addUtilities })=>{
4321
+ addUtilities({
4322
+ ".forced-color-adjust-auto": {
4323
+ "forced-color-adjust": "auto"
4324
+ },
4325
+ ".forced-color-adjust-none": {
4326
+ "forced-color-adjust": "none"
4327
+ }
4328
+ });
4329
+ }
4173
4330
  };
@@ -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
  /*
@@ -188,9 +195,9 @@ select {
188
195
  */
189
196
 
190
197
  button,
191
- [type='button'],
192
- [type='reset'],
193
- [type='submit'] {
198
+ input:where([type='button']),
199
+ input:where([type='reset']),
200
+ input:where([type='submit']) {
194
201
  -webkit-appearance: button; /* 1 */
195
202
  background-color: transparent; /* 2 */
196
203
  background-image: none; /* 2 */
@@ -266,7 +273,7 @@ summary {
266
273
  }
267
274
 
268
275
  /*
269
- Removes the default spacing for appropriate elements.
276
+ Removes the default spacing and border for appropriate elements.
270
277
  */
271
278
 
272
279
  blockquote,
@@ -302,6 +309,9 @@ menu {
302
309
  padding: 0;
303
310
  }
304
311
 
312
+ /*
313
+ Reset default styling for dialogs.
314
+ */
305
315
  dialog {
306
316
  padding: 0;
307
317
  }
@@ -21,7 +21,6 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
21
21
  const _path = /*#__PURE__*/ _interop_require_default(require("path"));
22
22
  const _isglob = /*#__PURE__*/ _interop_require_default(require("is-glob"));
23
23
  const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob"));
24
- const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path"));
25
24
  const _parseGlob = require("../util/parseGlob");
26
25
  const _sharedState = require("./sharedState");
27
26
  function _interop_require_default(obj) {
@@ -29,32 +28,42 @@ function _interop_require_default(obj) {
29
28
  default: obj
30
29
  };
31
30
  }
32
- /** @typedef {import('../../types/config.js').RawFile} RawFile */ /** @typedef {import('../../types/config.js').FilePath} FilePath */ /*
33
- * @param {import('tailwindcss').Config} tailwindConfig
34
- * @param {{skip:string[]}} options
35
- * @returns {ContentPath[]}
36
- */ function resolveContentFiles(tailwindConfig, { skip =[] } = {}) {
37
- if (tailwindConfig.content.files === "auto" && false) {
38
- _sharedState.env.DEBUG && console.time("Calculating resolve content paths");
39
- tailwindConfig.content.files = require("@tailwindcss/oxide").resolveContentPaths({
40
- base: process.cwd()
41
- });
42
- if (skip.length > 0) {
43
- tailwindConfig.content.files = tailwindConfig.content.files.filter((filePath)=>!skip.includes(filePath));
31
+ /*!
32
+ * Modified version of normalize-path, original license below
33
+ *
34
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
35
+ *
36
+ * Copyright (c) 2014-2018, Jon Schlinkert.
37
+ * Released under the MIT License.
38
+ */ function normalizePath(path) {
39
+ if (typeof path !== "string") {
40
+ throw new TypeError("expected path to be a string");
41
+ }
42
+ if (path === "\\" || path === "/") return "/";
43
+ var len = path.length;
44
+ if (len <= 1) return path;
45
+ // ensure that win32 namespaces has two leading slashes, so that the path is
46
+ // handled properly by the win32 version of path.parse() after being normalized
47
+ // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
48
+ var prefix = "";
49
+ if (len > 4 && path[3] === "\\") {
50
+ var ch = path[2];
51
+ if ((ch === "?" || ch === ".") && path.slice(0, 2) === "\\\\") {
52
+ path = path.slice(2);
53
+ prefix = "//";
44
54
  }
45
- _sharedState.env.DEBUG && console.timeEnd("Calculating resolve content paths");
46
55
  }
47
- return tailwindConfig.content.files;
56
+ // Modified part: instead of purely splitting on `\\` and `/`, we split on
57
+ // `/` and `\\` that is _not_ followed by any of the following characters: ()[]
58
+ // This is to ensure that we keep the escaping of brackets and parentheses
59
+ let segs = path.split(/[/\\]+(?![\(\)\[\]])/);
60
+ return prefix + segs.join("/");
48
61
  }
49
62
  function parseCandidateFiles(context, tailwindConfig) {
50
- let files = resolveContentFiles(tailwindConfig, {
51
- skip: [
52
- context.userConfigPath
53
- ]
54
- });
63
+ let files = tailwindConfig.content.files;
55
64
  // Normalize the file globs
56
65
  files = files.filter((filePath)=>typeof filePath === "string");
57
- files = files.map(_normalizepath.default);
66
+ files = files.map(normalizePath);
58
67
  // Split into included and excluded globs
59
68
  let tasks = _fastglob.default.generateTasks(files);
60
69
  /** @type {ContentPath[]} */ let included = [];
@@ -81,6 +90,9 @@ function parseCandidateFiles(context, tailwindConfig) {
81
90
  * @param {boolean} ignore
82
91
  * @returns {ContentPath}
83
92
  */ function parseFilePath(filePath, ignore) {
93
+ // Escape special characters in the file path such as: ()[]
94
+ // But only if the special character isn't already escaped
95
+ filePath = filePath.replace(/(?<!\\)([\[\]\(\)])/g, "\\$1");
84
96
  let contentPath = {
85
97
  original: filePath,
86
98
  base: filePath,
@@ -102,7 +114,7 @@ function parseCandidateFiles(context, tailwindConfig) {
102
114
  // Afaik, this technically shouldn't be needed but there's probably
103
115
  // some internal, direct path matching with a normalized path in
104
116
  // a package which can't handle mixed directory separators
105
- let base = (0, _normalizepath.default)(contentPath.base);
117
+ let base = normalizePath(contentPath.base);
106
118
  // If the user's file path contains any special characters (like parens) for instance fast-glob
107
119
  // is like "OOOH SHINY" and treats them as such. So we have to escape the base path to fix this
108
120
  base = _fastglob.default.escapePath(base);
@@ -156,7 +168,7 @@ function parseCandidateFiles(context, tailwindConfig) {
156
168
  return paths;
157
169
  }
158
170
  function resolvedChangedContent(context, candidateFiles, fileModifiedMap) {
159
- let changedContent = context.tailwindConfig.content.files === "auto" && false ? [] : context.tailwindConfig.content.files.filter((item)=>typeof item.raw === "string").map(({ raw , extension ="html" })=>({
171
+ let changedContent = context.tailwindConfig.content.files.filter((item)=>typeof item.raw === "string").map(({ raw , extension ="html" })=>({
160
172
  content: raw,
161
173
  extension
162
174
  }));