@pequity/squirrel 7.0.0 → 7.0.2

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.
@@ -75,16 +75,15 @@ const getGroupIdForArbitraryProperty = (className) => {
75
75
  const createClassMap = (config) => {
76
76
  const {
77
77
  theme,
78
- prefix
78
+ classGroups
79
79
  } = config;
80
80
  const classMap = {
81
81
  nextPart: /* @__PURE__ */ new Map(),
82
82
  validators: []
83
83
  };
84
- const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
85
- prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
86
- processClassesRecursively(classGroup, classMap, classGroupId, theme);
87
- });
84
+ for (const classGroupId in classGroups) {
85
+ processClassesRecursively(classGroups[classGroupId], classMap, classGroupId, theme);
86
+ }
88
87
  return classMap;
89
88
  };
90
89
  const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
@@ -124,23 +123,6 @@ const getPart = (classPartObject, path) => {
124
123
  return currentClassPartObject;
125
124
  };
126
125
  const isThemeGetter = (func) => func.isThemeGetter;
127
- const getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
128
- if (!prefix) {
129
- return classGroupEntries;
130
- }
131
- return classGroupEntries.map(([classGroupId, classGroup]) => {
132
- const prefixedClassGroup = classGroup.map((classDefinition) => {
133
- if (typeof classDefinition === "string") {
134
- return prefix + classDefinition;
135
- }
136
- if (typeof classDefinition === "object") {
137
- return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
138
- }
139
- return classDefinition;
140
- });
141
- return [classGroupId, prefixedClassGroup];
142
- });
143
- };
144
126
  const createLruCache = (maxCacheSize) => {
145
127
  if (maxCacheSize < 1) {
146
128
  return {
@@ -182,25 +164,25 @@ const createLruCache = (maxCacheSize) => {
182
164
  };
183
165
  };
184
166
  const IMPORTANT_MODIFIER = "!";
167
+ const MODIFIER_SEPARATOR = ":";
168
+ const MODIFIER_SEPARATOR_LENGTH = MODIFIER_SEPARATOR.length;
185
169
  const createParseClassName = (config) => {
186
170
  const {
187
- separator,
171
+ prefix,
188
172
  experimentalParseClassName
189
173
  } = config;
190
- const isSeparatorSingleCharacter = separator.length === 1;
191
- const firstSeparatorCharacter = separator[0];
192
- const separatorLength = separator.length;
193
- const parseClassName = (className) => {
174
+ let parseClassName = (className) => {
194
175
  const modifiers = [];
195
176
  let bracketDepth = 0;
177
+ let parenDepth = 0;
196
178
  let modifierStart = 0;
197
179
  let postfixModifierPosition;
198
180
  for (let index = 0; index < className.length; index++) {
199
181
  let currentCharacter = className[index];
200
- if (bracketDepth === 0) {
201
- if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
182
+ if (bracketDepth === 0 && parenDepth === 0) {
183
+ if (currentCharacter === MODIFIER_SEPARATOR) {
202
184
  modifiers.push(className.slice(modifierStart, index));
203
- modifierStart = index + separatorLength;
185
+ modifierStart = index + MODIFIER_SEPARATOR_LENGTH;
204
186
  continue;
205
187
  }
206
188
  if (currentCharacter === "/") {
@@ -212,11 +194,15 @@ const createParseClassName = (config) => {
212
194
  bracketDepth++;
213
195
  } else if (currentCharacter === "]") {
214
196
  bracketDepth--;
197
+ } else if (currentCharacter === "(") {
198
+ parenDepth++;
199
+ } else if (currentCharacter === ")") {
200
+ parenDepth--;
215
201
  }
216
202
  }
217
203
  const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
218
- const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
219
- const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
204
+ const baseClassName = stripImportantModifier(baseClassNameWithImportantModifier);
205
+ const hasImportantModifier = baseClassName !== baseClassNameWithImportantModifier;
220
206
  const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
221
207
  return {
222
208
  modifiers,
@@ -225,35 +211,61 @@ const createParseClassName = (config) => {
225
211
  maybePostfixModifierPosition
226
212
  };
227
213
  };
214
+ if (prefix) {
215
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
216
+ const parseClassNameOriginal = parseClassName;
217
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.substring(fullPrefix.length)) : {
218
+ isExternal: true,
219
+ modifiers: [],
220
+ hasImportantModifier: false,
221
+ baseClassName: className,
222
+ maybePostfixModifierPosition: void 0
223
+ };
224
+ }
228
225
  if (experimentalParseClassName) {
229
- return (className) => experimentalParseClassName({
226
+ const parseClassNameOriginal = parseClassName;
227
+ parseClassName = (className) => experimentalParseClassName({
230
228
  className,
231
- parseClassName
229
+ parseClassName: parseClassNameOriginal
232
230
  });
233
231
  }
234
232
  return parseClassName;
235
233
  };
236
- const sortModifiers = (modifiers) => {
237
- if (modifiers.length <= 1) {
238
- return modifiers;
234
+ const stripImportantModifier = (baseClassName) => {
235
+ if (baseClassName.endsWith(IMPORTANT_MODIFIER)) {
236
+ return baseClassName.substring(0, baseClassName.length - 1);
239
237
  }
240
- const sortedModifiers = [];
241
- let unsortedModifiers = [];
242
- modifiers.forEach((modifier) => {
243
- const isArbitraryVariant = modifier[0] === "[";
244
- if (isArbitraryVariant) {
245
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
246
- unsortedModifiers = [];
247
- } else {
248
- unsortedModifiers.push(modifier);
238
+ if (baseClassName.startsWith(IMPORTANT_MODIFIER)) {
239
+ return baseClassName.substring(1);
240
+ }
241
+ return baseClassName;
242
+ };
243
+ const createSortModifiers = (config) => {
244
+ const orderSensitiveModifiers = Object.fromEntries(config.orderSensitiveModifiers.map((modifier) => [modifier, true]));
245
+ const sortModifiers = (modifiers) => {
246
+ if (modifiers.length <= 1) {
247
+ return modifiers;
249
248
  }
250
- });
251
- sortedModifiers.push(...unsortedModifiers.sort());
252
- return sortedModifiers;
249
+ const sortedModifiers = [];
250
+ let unsortedModifiers = [];
251
+ modifiers.forEach((modifier) => {
252
+ const isPositionSensitive = modifier[0] === "[" || orderSensitiveModifiers[modifier];
253
+ if (isPositionSensitive) {
254
+ sortedModifiers.push(...unsortedModifiers.sort(), modifier);
255
+ unsortedModifiers = [];
256
+ } else {
257
+ unsortedModifiers.push(modifier);
258
+ }
259
+ });
260
+ sortedModifiers.push(...unsortedModifiers.sort());
261
+ return sortedModifiers;
262
+ };
263
+ return sortModifiers;
253
264
  };
254
265
  const createConfigUtils = (config) => ({
255
266
  cache: createLruCache(config.cacheSize),
256
267
  parseClassName: createParseClassName(config),
268
+ sortModifiers: createSortModifiers(config),
257
269
  ...createClassGroupUtils(config)
258
270
  });
259
271
  const SPLIT_CLASSES_REGEX = /\s+/;
@@ -261,7 +273,8 @@ const mergeClassList = (classList, configUtils) => {
261
273
  const {
262
274
  parseClassName,
263
275
  getClassGroupId,
264
- getConflictingClassGroupIds
276
+ getConflictingClassGroupIds,
277
+ sortModifiers
265
278
  } = configUtils;
266
279
  const classGroupsInConflict = [];
267
280
  const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
@@ -269,12 +282,17 @@ const mergeClassList = (classList, configUtils) => {
269
282
  for (let index = classNames.length - 1; index >= 0; index -= 1) {
270
283
  const originalClassName = classNames[index];
271
284
  const {
285
+ isExternal,
272
286
  modifiers,
273
287
  hasImportantModifier,
274
288
  baseClassName,
275
289
  maybePostfixModifierPosition
276
290
  } = parseClassName(originalClassName);
277
- let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
291
+ if (isExternal) {
292
+ result = originalClassName + (result.length > 0 ? " " + result : result);
293
+ continue;
294
+ }
295
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
278
296
  let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
279
297
  if (!classGroupId) {
280
298
  if (!hasPostfixModifier) {
@@ -366,39 +384,20 @@ const fromTheme = (key) => {
366
384
  themeGetter.isThemeGetter = true;
367
385
  return themeGetter;
368
386
  };
369
- const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
387
+ const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
388
+ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
370
389
  const fractionRegex = /^\d+\/\d+$/;
371
- const stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
372
390
  const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
373
391
  const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
374
392
  const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
375
393
  const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
376
394
  const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
377
- const isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
378
- const isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
395
+ const isFraction = (value) => fractionRegex.test(value);
379
396
  const isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
380
- const isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
381
397
  const isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
382
398
  const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
383
- const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
384
399
  const isTshirtSize = (value) => tshirtUnitRegex.test(value);
385
- const sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
386
- const isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
387
- const isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
388
- const imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
389
- const isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
390
- const isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
391
400
  const isAny = () => true;
392
- const getIsArbitraryValue = (value, label, testValue) => {
393
- const result = arbitraryValueRegex.exec(value);
394
- if (result) {
395
- if (result[1]) {
396
- return typeof label === "string" ? result[1] === label : label.has(result[1]);
397
- }
398
- return testValue(result[2]);
399
- }
400
- return false;
401
- };
402
401
  const isLengthOnly = (value) => (
403
402
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
404
403
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
@@ -408,87 +407,149 @@ const isLengthOnly = (value) => (
408
407
  const isNever = () => false;
409
408
  const isShadow = (value) => shadowRegex.test(value);
410
409
  const isImage = (value) => imageRegex.test(value);
410
+ const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
411
+ const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
412
+ const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
413
+ const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
414
+ const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
415
+ const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
416
+ const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
417
+ const isArbitraryShadow = (value) => getIsArbitraryValue(value, isNever, isShadow);
418
+ const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
419
+ const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
420
+ const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
421
+ const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
422
+ const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
423
+ const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
424
+ const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
425
+ const getIsArbitraryValue = (value, testLabel, testValue) => {
426
+ const result = arbitraryValueRegex.exec(value);
427
+ if (result) {
428
+ if (result[1]) {
429
+ return testLabel(result[1]);
430
+ }
431
+ return testValue(result[2]);
432
+ }
433
+ return false;
434
+ };
435
+ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
436
+ const result = arbitraryVariableRegex.exec(value);
437
+ if (result) {
438
+ if (result[1]) {
439
+ return testLabel(result[1]);
440
+ }
441
+ return shouldMatchNoLabel;
442
+ }
443
+ return false;
444
+ };
445
+ const isLabelPosition = (label) => label === "position";
446
+ const imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
447
+ const isLabelImage = (label) => imageLabels.has(label);
448
+ const sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
449
+ const isLabelSize = (label) => sizeLabels.has(label);
450
+ const isLabelLength = (label) => label === "length";
451
+ const isLabelNumber = (label) => label === "number";
452
+ const isLabelFamilyName = (label) => label === "family-name";
453
+ const isLabelShadow = (label) => label === "shadow";
411
454
  const getDefaultConfig = () => {
412
- const colors = fromTheme("colors");
413
- const spacing = fromTheme("spacing");
414
- const blur = fromTheme("blur");
415
- const brightness = fromTheme("brightness");
416
- const borderColor = fromTheme("borderColor");
417
- const borderRadius = fromTheme("borderRadius");
418
- const borderSpacing = fromTheme("borderSpacing");
419
- const borderWidth = fromTheme("borderWidth");
420
- const contrast = fromTheme("contrast");
421
- const grayscale = fromTheme("grayscale");
422
- const hueRotate = fromTheme("hueRotate");
423
- const invert = fromTheme("invert");
424
- const gap = fromTheme("gap");
425
- const gradientColorStops = fromTheme("gradientColorStops");
426
- const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
427
- const inset = fromTheme("inset");
428
- const margin = fromTheme("margin");
429
- const opacity = fromTheme("opacity");
430
- const padding = fromTheme("padding");
431
- const saturate = fromTheme("saturate");
432
- const scale = fromTheme("scale");
433
- const sepia = fromTheme("sepia");
434
- const skew = fromTheme("skew");
435
- const space = fromTheme("space");
436
- const translate = fromTheme("translate");
437
- const getOverscroll = () => ["auto", "contain", "none"];
438
- const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
439
- const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
440
- const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
441
- const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
442
- const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
443
- const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
444
- const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
445
- const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
446
- const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
447
- const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
448
- const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
449
- const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
455
+ const themeColor = fromTheme("color");
456
+ const themeFont = fromTheme("font");
457
+ const themeText = fromTheme("text");
458
+ const themeFontWeight = fromTheme("font-weight");
459
+ const themeTracking = fromTheme("tracking");
460
+ const themeLeading = fromTheme("leading");
461
+ const themeBreakpoint = fromTheme("breakpoint");
462
+ const themeContainer = fromTheme("container");
463
+ const themeSpacing = fromTheme("spacing");
464
+ const themeRadius = fromTheme("radius");
465
+ const themeShadow = fromTheme("shadow");
466
+ const themeInsetShadow = fromTheme("inset-shadow");
467
+ const themeDropShadow = fromTheme("drop-shadow");
468
+ const themeBlur = fromTheme("blur");
469
+ const themePerspective = fromTheme("perspective");
470
+ const themeAspect = fromTheme("aspect");
471
+ const themeEase = fromTheme("ease");
472
+ const themeAnimate = fromTheme("animate");
473
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
474
+ const scalePosition = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
475
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
476
+ const scaleOverscroll = () => ["auto", "contain", "none"];
477
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
478
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
479
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
480
+ const scaleGridColRowStartAndEnd = () => ["auto", {
481
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
482
+ }, isArbitraryVariable, isArbitraryValue];
483
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
484
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
485
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline"];
486
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch"];
487
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
488
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
489
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
490
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryLength];
491
+ const scaleRadius = () => [
492
+ // Deprecated since Tailwind CSS v4.0.0
493
+ "",
494
+ "none",
495
+ "full",
496
+ themeRadius,
497
+ isArbitraryVariable,
498
+ isArbitraryValue
499
+ ];
500
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
501
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
502
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
503
+ const scaleBlur = () => [
504
+ // Deprecated since Tailwind CSS v4.0.0
505
+ "",
506
+ "none",
507
+ themeBlur,
508
+ isArbitraryVariable,
509
+ isArbitraryValue
510
+ ];
511
+ const scaleOrigin = () => ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryVariable, isArbitraryValue];
512
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
513
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
514
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
515
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
450
516
  return {
451
517
  cacheSize: 500,
452
- separator: ":",
453
518
  theme: {
454
- colors: [isAny],
455
- spacing: [isLength, isArbitraryLength],
456
- blur: ["none", "", isTshirtSize, isArbitraryValue],
457
- brightness: getNumberAndArbitrary(),
458
- borderColor: [colors],
459
- borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
460
- borderSpacing: getSpacingWithArbitrary(),
461
- borderWidth: getLengthWithEmptyAndArbitrary(),
462
- contrast: getNumberAndArbitrary(),
463
- grayscale: getZeroAndEmpty(),
464
- hueRotate: getNumberAndArbitrary(),
465
- invert: getZeroAndEmpty(),
466
- gap: getSpacingWithArbitrary(),
467
- gradientColorStops: [colors],
468
- gradientColorStopPositions: [isPercent, isArbitraryLength],
469
- inset: getSpacingWithAutoAndArbitrary(),
470
- margin: getSpacingWithAutoAndArbitrary(),
471
- opacity: getNumberAndArbitrary(),
472
- padding: getSpacingWithArbitrary(),
473
- saturate: getNumberAndArbitrary(),
474
- scale: getNumberAndArbitrary(),
475
- sepia: getZeroAndEmpty(),
476
- skew: getNumberAndArbitrary(),
477
- space: getSpacingWithArbitrary(),
478
- translate: getSpacingWithArbitrary()
519
+ animate: ["spin", "ping", "pulse", "bounce"],
520
+ aspect: ["video"],
521
+ blur: [isTshirtSize],
522
+ breakpoint: [isTshirtSize],
523
+ color: [isAny],
524
+ container: [isTshirtSize],
525
+ "drop-shadow": [isTshirtSize],
526
+ ease: ["in", "out", "in-out"],
527
+ font: [isAnyNonArbitrary],
528
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
529
+ "inset-shadow": [isTshirtSize],
530
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
531
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
532
+ radius: [isTshirtSize],
533
+ shadow: [isTshirtSize],
534
+ spacing: ["px", isNumber],
535
+ text: [isTshirtSize],
536
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
479
537
  },
480
538
  classGroups: {
481
- // Layout
539
+ // --------------
540
+ // --- Layout ---
541
+ // --------------
482
542
  /**
483
543
  * Aspect Ratio
484
544
  * @see https://tailwindcss.com/docs/aspect-ratio
485
545
  */
486
546
  aspect: [{
487
- aspect: ["auto", "square", "video", isArbitraryValue]
547
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
488
548
  }],
489
549
  /**
490
550
  * Container
491
551
  * @see https://tailwindcss.com/docs/container
552
+ * @deprecated since Tailwind CSS v4.0.0
492
553
  */
493
554
  container: ["container"],
494
555
  /**
@@ -496,21 +557,21 @@ const getDefaultConfig = () => {
496
557
  * @see https://tailwindcss.com/docs/columns
497
558
  */
498
559
  columns: [{
499
- columns: [isTshirtSize]
560
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
500
561
  }],
501
562
  /**
502
563
  * Break After
503
564
  * @see https://tailwindcss.com/docs/break-after
504
565
  */
505
566
  "break-after": [{
506
- "break-after": getBreaks()
567
+ "break-after": scaleBreak()
507
568
  }],
508
569
  /**
509
570
  * Break Before
510
571
  * @see https://tailwindcss.com/docs/break-before
511
572
  */
512
573
  "break-before": [{
513
- "break-before": getBreaks()
574
+ "break-before": scaleBreak()
514
575
  }],
515
576
  /**
516
577
  * Break Inside
@@ -538,6 +599,11 @@ const getDefaultConfig = () => {
538
599
  * @see https://tailwindcss.com/docs/display
539
600
  */
540
601
  display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
602
+ /**
603
+ * Screen Reader Only
604
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
605
+ */
606
+ sr: ["sr-only", "not-sr-only"],
541
607
  /**
542
608
  * Floats
543
609
  * @see https://tailwindcss.com/docs/float
@@ -569,49 +635,49 @@ const getDefaultConfig = () => {
569
635
  * @see https://tailwindcss.com/docs/object-position
570
636
  */
571
637
  "object-position": [{
572
- object: [...getPositions(), isArbitraryValue]
638
+ object: [...scalePosition(), isArbitraryValue, isArbitraryVariable]
573
639
  }],
574
640
  /**
575
641
  * Overflow
576
642
  * @see https://tailwindcss.com/docs/overflow
577
643
  */
578
644
  overflow: [{
579
- overflow: getOverflow()
645
+ overflow: scaleOverflow()
580
646
  }],
581
647
  /**
582
648
  * Overflow X
583
649
  * @see https://tailwindcss.com/docs/overflow
584
650
  */
585
651
  "overflow-x": [{
586
- "overflow-x": getOverflow()
652
+ "overflow-x": scaleOverflow()
587
653
  }],
588
654
  /**
589
655
  * Overflow Y
590
656
  * @see https://tailwindcss.com/docs/overflow
591
657
  */
592
658
  "overflow-y": [{
593
- "overflow-y": getOverflow()
659
+ "overflow-y": scaleOverflow()
594
660
  }],
595
661
  /**
596
662
  * Overscroll Behavior
597
663
  * @see https://tailwindcss.com/docs/overscroll-behavior
598
664
  */
599
665
  overscroll: [{
600
- overscroll: getOverscroll()
666
+ overscroll: scaleOverscroll()
601
667
  }],
602
668
  /**
603
669
  * Overscroll Behavior X
604
670
  * @see https://tailwindcss.com/docs/overscroll-behavior
605
671
  */
606
672
  "overscroll-x": [{
607
- "overscroll-x": getOverscroll()
673
+ "overscroll-x": scaleOverscroll()
608
674
  }],
609
675
  /**
610
676
  * Overscroll Behavior Y
611
677
  * @see https://tailwindcss.com/docs/overscroll-behavior
612
678
  */
613
679
  "overscroll-y": [{
614
- "overscroll-y": getOverscroll()
680
+ "overscroll-y": scaleOverscroll()
615
681
  }],
616
682
  /**
617
683
  * Position
@@ -623,63 +689,63 @@ const getDefaultConfig = () => {
623
689
  * @see https://tailwindcss.com/docs/top-right-bottom-left
624
690
  */
625
691
  inset: [{
626
- inset: [inset]
692
+ inset: scaleInset()
627
693
  }],
628
694
  /**
629
695
  * Right / Left
630
696
  * @see https://tailwindcss.com/docs/top-right-bottom-left
631
697
  */
632
698
  "inset-x": [{
633
- "inset-x": [inset]
699
+ "inset-x": scaleInset()
634
700
  }],
635
701
  /**
636
702
  * Top / Bottom
637
703
  * @see https://tailwindcss.com/docs/top-right-bottom-left
638
704
  */
639
705
  "inset-y": [{
640
- "inset-y": [inset]
706
+ "inset-y": scaleInset()
641
707
  }],
642
708
  /**
643
709
  * Start
644
710
  * @see https://tailwindcss.com/docs/top-right-bottom-left
645
711
  */
646
712
  start: [{
647
- start: [inset]
713
+ start: scaleInset()
648
714
  }],
649
715
  /**
650
716
  * End
651
717
  * @see https://tailwindcss.com/docs/top-right-bottom-left
652
718
  */
653
719
  end: [{
654
- end: [inset]
720
+ end: scaleInset()
655
721
  }],
656
722
  /**
657
723
  * Top
658
724
  * @see https://tailwindcss.com/docs/top-right-bottom-left
659
725
  */
660
726
  top: [{
661
- top: [inset]
727
+ top: scaleInset()
662
728
  }],
663
729
  /**
664
730
  * Right
665
731
  * @see https://tailwindcss.com/docs/top-right-bottom-left
666
732
  */
667
733
  right: [{
668
- right: [inset]
734
+ right: scaleInset()
669
735
  }],
670
736
  /**
671
737
  * Bottom
672
738
  * @see https://tailwindcss.com/docs/top-right-bottom-left
673
739
  */
674
740
  bottom: [{
675
- bottom: [inset]
741
+ bottom: scaleInset()
676
742
  }],
677
743
  /**
678
744
  * Left
679
745
  * @see https://tailwindcss.com/docs/top-right-bottom-left
680
746
  */
681
747
  left: [{
682
- left: [inset]
748
+ left: scaleInset()
683
749
  }],
684
750
  /**
685
751
  * Visibility
@@ -691,15 +757,17 @@ const getDefaultConfig = () => {
691
757
  * @see https://tailwindcss.com/docs/z-index
692
758
  */
693
759
  z: [{
694
- z: ["auto", isInteger, isArbitraryValue]
760
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
695
761
  }],
696
- // Flexbox and Grid
762
+ // ------------------------
763
+ // --- Flexbox and Grid ---
764
+ // ------------------------
697
765
  /**
698
766
  * Flex Basis
699
767
  * @see https://tailwindcss.com/docs/flex-basis
700
768
  */
701
769
  basis: [{
702
- basis: getSpacingWithAutoAndArbitrary()
770
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
703
771
  }],
704
772
  /**
705
773
  * Flex Direction
@@ -713,95 +781,91 @@ const getDefaultConfig = () => {
713
781
  * @see https://tailwindcss.com/docs/flex-wrap
714
782
  */
715
783
  "flex-wrap": [{
716
- flex: ["wrap", "wrap-reverse", "nowrap"]
784
+ flex: ["nowrap", "wrap", "wrap-reverse"]
717
785
  }],
718
786
  /**
719
787
  * Flex
720
788
  * @see https://tailwindcss.com/docs/flex
721
789
  */
722
790
  flex: [{
723
- flex: ["1", "auto", "initial", "none", isArbitraryValue]
791
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
724
792
  }],
725
793
  /**
726
794
  * Flex Grow
727
795
  * @see https://tailwindcss.com/docs/flex-grow
728
796
  */
729
797
  grow: [{
730
- grow: getZeroAndEmpty()
798
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
731
799
  }],
732
800
  /**
733
801
  * Flex Shrink
734
802
  * @see https://tailwindcss.com/docs/flex-shrink
735
803
  */
736
804
  shrink: [{
737
- shrink: getZeroAndEmpty()
805
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
738
806
  }],
739
807
  /**
740
808
  * Order
741
809
  * @see https://tailwindcss.com/docs/order
742
810
  */
743
811
  order: [{
744
- order: ["first", "last", "none", isInteger, isArbitraryValue]
812
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
745
813
  }],
746
814
  /**
747
815
  * Grid Template Columns
748
816
  * @see https://tailwindcss.com/docs/grid-template-columns
749
817
  */
750
818
  "grid-cols": [{
751
- "grid-cols": [isAny]
819
+ "grid-cols": scaleGridTemplateColsRows()
752
820
  }],
753
821
  /**
754
822
  * Grid Column Start / End
755
823
  * @see https://tailwindcss.com/docs/grid-column
756
824
  */
757
825
  "col-start-end": [{
758
- col: ["auto", {
759
- span: ["full", isInteger, isArbitraryValue]
760
- }, isArbitraryValue]
826
+ col: scaleGridColRowStartAndEnd()
761
827
  }],
762
828
  /**
763
829
  * Grid Column Start
764
830
  * @see https://tailwindcss.com/docs/grid-column
765
831
  */
766
832
  "col-start": [{
767
- "col-start": getNumberWithAutoAndArbitrary()
833
+ "col-start": scaleGridColRowStartOrEnd()
768
834
  }],
769
835
  /**
770
836
  * Grid Column End
771
837
  * @see https://tailwindcss.com/docs/grid-column
772
838
  */
773
839
  "col-end": [{
774
- "col-end": getNumberWithAutoAndArbitrary()
840
+ "col-end": scaleGridColRowStartOrEnd()
775
841
  }],
776
842
  /**
777
843
  * Grid Template Rows
778
844
  * @see https://tailwindcss.com/docs/grid-template-rows
779
845
  */
780
846
  "grid-rows": [{
781
- "grid-rows": [isAny]
847
+ "grid-rows": scaleGridTemplateColsRows()
782
848
  }],
783
849
  /**
784
850
  * Grid Row Start / End
785
851
  * @see https://tailwindcss.com/docs/grid-row
786
852
  */
787
853
  "row-start-end": [{
788
- row: ["auto", {
789
- span: [isInteger, isArbitraryValue]
790
- }, isArbitraryValue]
854
+ row: scaleGridColRowStartAndEnd()
791
855
  }],
792
856
  /**
793
857
  * Grid Row Start
794
858
  * @see https://tailwindcss.com/docs/grid-row
795
859
  */
796
860
  "row-start": [{
797
- "row-start": getNumberWithAutoAndArbitrary()
861
+ "row-start": scaleGridColRowStartOrEnd()
798
862
  }],
799
863
  /**
800
864
  * Grid Row End
801
865
  * @see https://tailwindcss.com/docs/grid-row
802
866
  */
803
867
  "row-end": [{
804
- "row-end": getNumberWithAutoAndArbitrary()
868
+ "row-end": scaleGridColRowStartOrEnd()
805
869
  }],
806
870
  /**
807
871
  * Grid Auto Flow
@@ -815,98 +879,98 @@ const getDefaultConfig = () => {
815
879
  * @see https://tailwindcss.com/docs/grid-auto-columns
816
880
  */
817
881
  "auto-cols": [{
818
- "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
882
+ "auto-cols": scaleGridAutoColsRows()
819
883
  }],
820
884
  /**
821
885
  * Grid Auto Rows
822
886
  * @see https://tailwindcss.com/docs/grid-auto-rows
823
887
  */
824
888
  "auto-rows": [{
825
- "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
889
+ "auto-rows": scaleGridAutoColsRows()
826
890
  }],
827
891
  /**
828
892
  * Gap
829
893
  * @see https://tailwindcss.com/docs/gap
830
894
  */
831
895
  gap: [{
832
- gap: [gap]
896
+ gap: scaleUnambiguousSpacing()
833
897
  }],
834
898
  /**
835
899
  * Gap X
836
900
  * @see https://tailwindcss.com/docs/gap
837
901
  */
838
902
  "gap-x": [{
839
- "gap-x": [gap]
903
+ "gap-x": scaleUnambiguousSpacing()
840
904
  }],
841
905
  /**
842
906
  * Gap Y
843
907
  * @see https://tailwindcss.com/docs/gap
844
908
  */
845
909
  "gap-y": [{
846
- "gap-y": [gap]
910
+ "gap-y": scaleUnambiguousSpacing()
847
911
  }],
848
912
  /**
849
913
  * Justify Content
850
914
  * @see https://tailwindcss.com/docs/justify-content
851
915
  */
852
916
  "justify-content": [{
853
- justify: ["normal", ...getAlign()]
917
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
854
918
  }],
855
919
  /**
856
920
  * Justify Items
857
921
  * @see https://tailwindcss.com/docs/justify-items
858
922
  */
859
923
  "justify-items": [{
860
- "justify-items": ["start", "end", "center", "stretch"]
924
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
861
925
  }],
862
926
  /**
863
927
  * Justify Self
864
928
  * @see https://tailwindcss.com/docs/justify-self
865
929
  */
866
930
  "justify-self": [{
867
- "justify-self": ["auto", "start", "end", "center", "stretch"]
931
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
868
932
  }],
869
933
  /**
870
934
  * Align Content
871
935
  * @see https://tailwindcss.com/docs/align-content
872
936
  */
873
937
  "align-content": [{
874
- content: ["normal", ...getAlign(), "baseline"]
938
+ content: ["normal", ...scaleAlignPrimaryAxis()]
875
939
  }],
876
940
  /**
877
941
  * Align Items
878
942
  * @see https://tailwindcss.com/docs/align-items
879
943
  */
880
944
  "align-items": [{
881
- items: ["start", "end", "center", "baseline", "stretch"]
945
+ items: [...scaleAlignSecondaryAxis(), "baseline"]
882
946
  }],
883
947
  /**
884
948
  * Align Self
885
949
  * @see https://tailwindcss.com/docs/align-self
886
950
  */
887
951
  "align-self": [{
888
- self: ["auto", "start", "end", "center", "stretch", "baseline"]
952
+ self: ["auto", ...scaleAlignSecondaryAxis(), "baseline"]
889
953
  }],
890
954
  /**
891
955
  * Place Content
892
956
  * @see https://tailwindcss.com/docs/place-content
893
957
  */
894
958
  "place-content": [{
895
- "place-content": [...getAlign(), "baseline"]
959
+ "place-content": scaleAlignPrimaryAxis()
896
960
  }],
897
961
  /**
898
962
  * Place Items
899
963
  * @see https://tailwindcss.com/docs/place-items
900
964
  */
901
965
  "place-items": [{
902
- "place-items": ["start", "end", "center", "baseline", "stretch"]
966
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
903
967
  }],
904
968
  /**
905
969
  * Place Self
906
970
  * @see https://tailwindcss.com/docs/place-self
907
971
  */
908
972
  "place-self": [{
909
- "place-self": ["auto", "start", "end", "center", "stretch"]
973
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
910
974
  }],
911
975
  // Spacing
912
976
  /**
@@ -914,210 +978,229 @@ const getDefaultConfig = () => {
914
978
  * @see https://tailwindcss.com/docs/padding
915
979
  */
916
980
  p: [{
917
- p: [padding]
981
+ p: scaleUnambiguousSpacing()
918
982
  }],
919
983
  /**
920
984
  * Padding X
921
985
  * @see https://tailwindcss.com/docs/padding
922
986
  */
923
987
  px: [{
924
- px: [padding]
988
+ px: scaleUnambiguousSpacing()
925
989
  }],
926
990
  /**
927
991
  * Padding Y
928
992
  * @see https://tailwindcss.com/docs/padding
929
993
  */
930
994
  py: [{
931
- py: [padding]
995
+ py: scaleUnambiguousSpacing()
932
996
  }],
933
997
  /**
934
998
  * Padding Start
935
999
  * @see https://tailwindcss.com/docs/padding
936
1000
  */
937
1001
  ps: [{
938
- ps: [padding]
1002
+ ps: scaleUnambiguousSpacing()
939
1003
  }],
940
1004
  /**
941
1005
  * Padding End
942
1006
  * @see https://tailwindcss.com/docs/padding
943
1007
  */
944
1008
  pe: [{
945
- pe: [padding]
1009
+ pe: scaleUnambiguousSpacing()
946
1010
  }],
947
1011
  /**
948
1012
  * Padding Top
949
1013
  * @see https://tailwindcss.com/docs/padding
950
1014
  */
951
1015
  pt: [{
952
- pt: [padding]
1016
+ pt: scaleUnambiguousSpacing()
953
1017
  }],
954
1018
  /**
955
1019
  * Padding Right
956
1020
  * @see https://tailwindcss.com/docs/padding
957
1021
  */
958
1022
  pr: [{
959
- pr: [padding]
1023
+ pr: scaleUnambiguousSpacing()
960
1024
  }],
961
1025
  /**
962
1026
  * Padding Bottom
963
1027
  * @see https://tailwindcss.com/docs/padding
964
1028
  */
965
1029
  pb: [{
966
- pb: [padding]
1030
+ pb: scaleUnambiguousSpacing()
967
1031
  }],
968
1032
  /**
969
1033
  * Padding Left
970
1034
  * @see https://tailwindcss.com/docs/padding
971
1035
  */
972
1036
  pl: [{
973
- pl: [padding]
1037
+ pl: scaleUnambiguousSpacing()
974
1038
  }],
975
1039
  /**
976
1040
  * Margin
977
1041
  * @see https://tailwindcss.com/docs/margin
978
1042
  */
979
1043
  m: [{
980
- m: [margin]
1044
+ m: scaleMargin()
981
1045
  }],
982
1046
  /**
983
1047
  * Margin X
984
1048
  * @see https://tailwindcss.com/docs/margin
985
1049
  */
986
1050
  mx: [{
987
- mx: [margin]
1051
+ mx: scaleMargin()
988
1052
  }],
989
1053
  /**
990
1054
  * Margin Y
991
1055
  * @see https://tailwindcss.com/docs/margin
992
1056
  */
993
1057
  my: [{
994
- my: [margin]
1058
+ my: scaleMargin()
995
1059
  }],
996
1060
  /**
997
1061
  * Margin Start
998
1062
  * @see https://tailwindcss.com/docs/margin
999
1063
  */
1000
1064
  ms: [{
1001
- ms: [margin]
1065
+ ms: scaleMargin()
1002
1066
  }],
1003
1067
  /**
1004
1068
  * Margin End
1005
1069
  * @see https://tailwindcss.com/docs/margin
1006
1070
  */
1007
1071
  me: [{
1008
- me: [margin]
1072
+ me: scaleMargin()
1009
1073
  }],
1010
1074
  /**
1011
1075
  * Margin Top
1012
1076
  * @see https://tailwindcss.com/docs/margin
1013
1077
  */
1014
1078
  mt: [{
1015
- mt: [margin]
1079
+ mt: scaleMargin()
1016
1080
  }],
1017
1081
  /**
1018
1082
  * Margin Right
1019
1083
  * @see https://tailwindcss.com/docs/margin
1020
1084
  */
1021
1085
  mr: [{
1022
- mr: [margin]
1086
+ mr: scaleMargin()
1023
1087
  }],
1024
1088
  /**
1025
1089
  * Margin Bottom
1026
1090
  * @see https://tailwindcss.com/docs/margin
1027
1091
  */
1028
1092
  mb: [{
1029
- mb: [margin]
1093
+ mb: scaleMargin()
1030
1094
  }],
1031
1095
  /**
1032
1096
  * Margin Left
1033
1097
  * @see https://tailwindcss.com/docs/margin
1034
1098
  */
1035
1099
  ml: [{
1036
- ml: [margin]
1100
+ ml: scaleMargin()
1037
1101
  }],
1038
1102
  /**
1039
1103
  * Space Between X
1040
- * @see https://tailwindcss.com/docs/space
1104
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1041
1105
  */
1042
1106
  "space-x": [{
1043
- "space-x": [space]
1107
+ "space-x": scaleUnambiguousSpacing()
1044
1108
  }],
1045
1109
  /**
1046
1110
  * Space Between X Reverse
1047
- * @see https://tailwindcss.com/docs/space
1111
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1048
1112
  */
1049
1113
  "space-x-reverse": ["space-x-reverse"],
1050
1114
  /**
1051
1115
  * Space Between Y
1052
- * @see https://tailwindcss.com/docs/space
1116
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1053
1117
  */
1054
1118
  "space-y": [{
1055
- "space-y": [space]
1119
+ "space-y": scaleUnambiguousSpacing()
1056
1120
  }],
1057
1121
  /**
1058
1122
  * Space Between Y Reverse
1059
- * @see https://tailwindcss.com/docs/space
1123
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1060
1124
  */
1061
1125
  "space-y-reverse": ["space-y-reverse"],
1062
- // Sizing
1126
+ // --------------
1127
+ // --- Sizing ---
1128
+ // --------------
1129
+ /**
1130
+ * Size
1131
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1132
+ */
1133
+ size: [{
1134
+ size: scaleSizing()
1135
+ }],
1063
1136
  /**
1064
1137
  * Width
1065
1138
  * @see https://tailwindcss.com/docs/width
1066
1139
  */
1067
1140
  w: [{
1068
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
1141
+ w: [themeContainer, "screen", ...scaleSizing()]
1069
1142
  }],
1070
1143
  /**
1071
1144
  * Min-Width
1072
1145
  * @see https://tailwindcss.com/docs/min-width
1073
1146
  */
1074
1147
  "min-w": [{
1075
- "min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
1148
+ "min-w": [
1149
+ themeContainer,
1150
+ "screen",
1151
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1152
+ "none",
1153
+ ...scaleSizing()
1154
+ ]
1076
1155
  }],
1077
1156
  /**
1078
1157
  * Max-Width
1079
1158
  * @see https://tailwindcss.com/docs/max-width
1080
1159
  */
1081
1160
  "max-w": [{
1082
- "max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
1083
- screen: [isTshirtSize]
1084
- }, isTshirtSize]
1161
+ "max-w": [
1162
+ themeContainer,
1163
+ "screen",
1164
+ "none",
1165
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1166
+ "prose",
1167
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1168
+ {
1169
+ screen: [themeBreakpoint]
1170
+ },
1171
+ ...scaleSizing()
1172
+ ]
1085
1173
  }],
1086
1174
  /**
1087
1175
  * Height
1088
1176
  * @see https://tailwindcss.com/docs/height
1089
1177
  */
1090
1178
  h: [{
1091
- h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
1179
+ h: ["screen", ...scaleSizing()]
1092
1180
  }],
1093
1181
  /**
1094
1182
  * Min-Height
1095
1183
  * @see https://tailwindcss.com/docs/min-height
1096
1184
  */
1097
1185
  "min-h": [{
1098
- "min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1186
+ "min-h": ["screen", "none", ...scaleSizing()]
1099
1187
  }],
1100
1188
  /**
1101
1189
  * Max-Height
1102
1190
  * @see https://tailwindcss.com/docs/max-height
1103
1191
  */
1104
1192
  "max-h": [{
1105
- "max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1106
- }],
1107
- /**
1108
- * Size
1109
- * @see https://tailwindcss.com/docs/size
1110
- */
1111
- size: [{
1112
- size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
1193
+ "max-h": ["screen", ...scaleSizing()]
1113
1194
  }],
1114
- // Typography
1195
+ // ------------------
1196
+ // --- Typography ---
1197
+ // ------------------
1115
1198
  /**
1116
1199
  * Font Size
1117
1200
  * @see https://tailwindcss.com/docs/font-size
1118
1201
  */
1119
1202
  "font-size": [{
1120
- text: ["base", isTshirtSize, isArbitraryLength]
1203
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
1121
1204
  }],
1122
1205
  /**
1123
1206
  * Font Smoothing
@@ -1134,14 +1217,21 @@ const getDefaultConfig = () => {
1134
1217
  * @see https://tailwindcss.com/docs/font-weight
1135
1218
  */
1136
1219
  "font-weight": [{
1137
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
1220
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
1221
+ }],
1222
+ /**
1223
+ * Font Stretch
1224
+ * @see https://tailwindcss.com/docs/font-stretch
1225
+ */
1226
+ "font-stretch": [{
1227
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
1138
1228
  }],
1139
1229
  /**
1140
1230
  * Font Family
1141
1231
  * @see https://tailwindcss.com/docs/font-family
1142
1232
  */
1143
1233
  "font-family": [{
1144
- font: [isAny]
1234
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
1145
1235
  }],
1146
1236
  /**
1147
1237
  * Font Variant Numeric
@@ -1172,41 +1262,38 @@ const getDefaultConfig = () => {
1172
1262
  * Font Variant Numeric
1173
1263
  * @see https://tailwindcss.com/docs/font-variant-numeric
1174
1264
  */
1175
- "fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
1265
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1176
1266
  /**
1177
1267
  * Letter Spacing
1178
1268
  * @see https://tailwindcss.com/docs/letter-spacing
1179
1269
  */
1180
1270
  tracking: [{
1181
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
1271
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1182
1272
  }],
1183
1273
  /**
1184
1274
  * Line Clamp
1185
1275
  * @see https://tailwindcss.com/docs/line-clamp
1186
1276
  */
1187
1277
  "line-clamp": [{
1188
- "line-clamp": ["none", isNumber, isArbitraryNumber]
1278
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
1189
1279
  }],
1190
1280
  /**
1191
1281
  * Line Height
1192
1282
  * @see https://tailwindcss.com/docs/line-height
1193
1283
  */
1194
1284
  leading: [{
1195
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
1285
+ leading: [
1286
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1287
+ themeLeading,
1288
+ ...scaleUnambiguousSpacing()
1289
+ ]
1196
1290
  }],
1197
1291
  /**
1198
1292
  * List Style Image
1199
1293
  * @see https://tailwindcss.com/docs/list-style-image
1200
1294
  */
1201
1295
  "list-image": [{
1202
- "list-image": ["none", isArbitraryValue]
1203
- }],
1204
- /**
1205
- * List Style Type
1206
- * @see https://tailwindcss.com/docs/list-style-type
1207
- */
1208
- "list-style-type": [{
1209
- list: ["none", "disc", "decimal", isArbitraryValue]
1296
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
1210
1297
  }],
1211
1298
  /**
1212
1299
  * List Style Position
@@ -1216,19 +1303,11 @@ const getDefaultConfig = () => {
1216
1303
  list: ["inside", "outside"]
1217
1304
  }],
1218
1305
  /**
1219
- * Placeholder Color
1220
- * @deprecated since Tailwind CSS v3.0.0
1221
- * @see https://tailwindcss.com/docs/placeholder-color
1222
- */
1223
- "placeholder-color": [{
1224
- placeholder: [colors]
1225
- }],
1226
- /**
1227
- * Placeholder Opacity
1228
- * @see https://tailwindcss.com/docs/placeholder-opacity
1306
+ * List Style Type
1307
+ * @see https://tailwindcss.com/docs/list-style-type
1229
1308
  */
1230
- "placeholder-opacity": [{
1231
- "placeholder-opacity": [opacity]
1309
+ "list-style-type": [{
1310
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1232
1311
  }],
1233
1312
  /**
1234
1313
  * Text Alignment
@@ -1238,18 +1317,19 @@ const getDefaultConfig = () => {
1238
1317
  text: ["left", "center", "right", "justify", "start", "end"]
1239
1318
  }],
1240
1319
  /**
1241
- * Text Color
1242
- * @see https://tailwindcss.com/docs/text-color
1320
+ * Placeholder Color
1321
+ * @deprecated since Tailwind CSS v3.0.0
1322
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1243
1323
  */
1244
- "text-color": [{
1245
- text: [colors]
1324
+ "placeholder-color": [{
1325
+ placeholder: scaleColor()
1246
1326
  }],
1247
1327
  /**
1248
- * Text Opacity
1249
- * @see https://tailwindcss.com/docs/text-opacity
1328
+ * Text Color
1329
+ * @see https://tailwindcss.com/docs/text-color
1250
1330
  */
1251
- "text-opacity": [{
1252
- "text-opacity": [opacity]
1331
+ "text-color": [{
1332
+ text: scaleColor()
1253
1333
  }],
1254
1334
  /**
1255
1335
  * Text Decoration
@@ -1261,28 +1341,28 @@ const getDefaultConfig = () => {
1261
1341
  * @see https://tailwindcss.com/docs/text-decoration-style
1262
1342
  */
1263
1343
  "text-decoration-style": [{
1264
- decoration: [...getLineStyles(), "wavy"]
1344
+ decoration: [...scaleLineStyle(), "wavy"]
1265
1345
  }],
1266
1346
  /**
1267
1347
  * Text Decoration Thickness
1268
1348
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1269
1349
  */
1270
1350
  "text-decoration-thickness": [{
1271
- decoration: ["auto", "from-font", isLength, isArbitraryLength]
1272
- }],
1273
- /**
1274
- * Text Underline Offset
1275
- * @see https://tailwindcss.com/docs/text-underline-offset
1276
- */
1277
- "underline-offset": [{
1278
- "underline-offset": ["auto", isLength, isArbitraryValue]
1351
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1279
1352
  }],
1280
1353
  /**
1281
1354
  * Text Decoration Color
1282
1355
  * @see https://tailwindcss.com/docs/text-decoration-color
1283
1356
  */
1284
1357
  "text-decoration-color": [{
1285
- decoration: [colors]
1358
+ decoration: scaleColor()
1359
+ }],
1360
+ /**
1361
+ * Text Underline Offset
1362
+ * @see https://tailwindcss.com/docs/text-underline-offset
1363
+ */
1364
+ "underline-offset": [{
1365
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1286
1366
  }],
1287
1367
  /**
1288
1368
  * Text Transform
@@ -1306,14 +1386,14 @@ const getDefaultConfig = () => {
1306
1386
  * @see https://tailwindcss.com/docs/text-indent
1307
1387
  */
1308
1388
  indent: [{
1309
- indent: getSpacingWithArbitrary()
1389
+ indent: scaleUnambiguousSpacing()
1310
1390
  }],
1311
1391
  /**
1312
1392
  * Vertical Alignment
1313
1393
  * @see https://tailwindcss.com/docs/vertical-align
1314
1394
  */
1315
1395
  "vertical-align": [{
1316
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
1396
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1317
1397
  }],
1318
1398
  /**
1319
1399
  * Whitespace
@@ -1341,9 +1421,11 @@ const getDefaultConfig = () => {
1341
1421
  * @see https://tailwindcss.com/docs/content
1342
1422
  */
1343
1423
  content: [{
1344
- content: ["none", isArbitraryValue]
1424
+ content: ["none", isArbitraryVariable, isArbitraryValue]
1345
1425
  }],
1346
- // Backgrounds
1426
+ // -------------------
1427
+ // --- Backgrounds ---
1428
+ // -------------------
1347
1429
  /**
1348
1430
  * Background Attachment
1349
1431
  * @see https://tailwindcss.com/docs/background-attachment
@@ -1358,14 +1440,6 @@ const getDefaultConfig = () => {
1358
1440
  "bg-clip": [{
1359
1441
  "bg-clip": ["border", "padding", "content", "text"]
1360
1442
  }],
1361
- /**
1362
- * Background Opacity
1363
- * @deprecated since Tailwind CSS v3.0.0
1364
- * @see https://tailwindcss.com/docs/background-opacity
1365
- */
1366
- "bg-opacity": [{
1367
- "bg-opacity": [opacity]
1368
- }],
1369
1443
  /**
1370
1444
  * Background Origin
1371
1445
  * @see https://tailwindcss.com/docs/background-origin
@@ -1378,7 +1452,7 @@ const getDefaultConfig = () => {
1378
1452
  * @see https://tailwindcss.com/docs/background-position
1379
1453
  */
1380
1454
  "bg-position": [{
1381
- bg: [...getPositions(), isArbitraryPosition]
1455
+ bg: [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition]
1382
1456
  }],
1383
1457
  /**
1384
1458
  * Background Repeat
@@ -1386,7 +1460,7 @@ const getDefaultConfig = () => {
1386
1460
  */
1387
1461
  "bg-repeat": [{
1388
1462
  bg: ["no-repeat", {
1389
- repeat: ["", "x", "y", "round", "space"]
1463
+ repeat: ["", "x", "y", "space", "round"]
1390
1464
  }]
1391
1465
  }],
1392
1466
  /**
@@ -1394,7 +1468,7 @@ const getDefaultConfig = () => {
1394
1468
  * @see https://tailwindcss.com/docs/background-size
1395
1469
  */
1396
1470
  "bg-size": [{
1397
- bg: ["auto", "cover", "contain", isArbitrarySize]
1471
+ bg: ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize]
1398
1472
  }],
1399
1473
  /**
1400
1474
  * Background Image
@@ -1402,597 +1476,646 @@ const getDefaultConfig = () => {
1402
1476
  */
1403
1477
  "bg-image": [{
1404
1478
  bg: ["none", {
1405
- "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1406
- }, isArbitraryImage]
1479
+ linear: [{
1480
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1481
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
1482
+ radial: ["", isArbitraryVariable, isArbitraryValue],
1483
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1484
+ }, isArbitraryVariableImage, isArbitraryImage]
1407
1485
  }],
1408
1486
  /**
1409
1487
  * Background Color
1410
1488
  * @see https://tailwindcss.com/docs/background-color
1411
1489
  */
1412
1490
  "bg-color": [{
1413
- bg: [colors]
1491
+ bg: scaleColor()
1414
1492
  }],
1415
1493
  /**
1416
1494
  * Gradient Color Stops From Position
1417
1495
  * @see https://tailwindcss.com/docs/gradient-color-stops
1418
1496
  */
1419
1497
  "gradient-from-pos": [{
1420
- from: [gradientColorStopPositions]
1498
+ from: scaleGradientStopPosition()
1421
1499
  }],
1422
1500
  /**
1423
1501
  * Gradient Color Stops Via Position
1424
1502
  * @see https://tailwindcss.com/docs/gradient-color-stops
1425
1503
  */
1426
1504
  "gradient-via-pos": [{
1427
- via: [gradientColorStopPositions]
1505
+ via: scaleGradientStopPosition()
1428
1506
  }],
1429
1507
  /**
1430
1508
  * Gradient Color Stops To Position
1431
1509
  * @see https://tailwindcss.com/docs/gradient-color-stops
1432
1510
  */
1433
1511
  "gradient-to-pos": [{
1434
- to: [gradientColorStopPositions]
1512
+ to: scaleGradientStopPosition()
1435
1513
  }],
1436
1514
  /**
1437
1515
  * Gradient Color Stops From
1438
1516
  * @see https://tailwindcss.com/docs/gradient-color-stops
1439
1517
  */
1440
1518
  "gradient-from": [{
1441
- from: [gradientColorStops]
1519
+ from: scaleColor()
1442
1520
  }],
1443
1521
  /**
1444
1522
  * Gradient Color Stops Via
1445
1523
  * @see https://tailwindcss.com/docs/gradient-color-stops
1446
1524
  */
1447
1525
  "gradient-via": [{
1448
- via: [gradientColorStops]
1526
+ via: scaleColor()
1449
1527
  }],
1450
1528
  /**
1451
1529
  * Gradient Color Stops To
1452
1530
  * @see https://tailwindcss.com/docs/gradient-color-stops
1453
1531
  */
1454
1532
  "gradient-to": [{
1455
- to: [gradientColorStops]
1533
+ to: scaleColor()
1456
1534
  }],
1457
- // Borders
1535
+ // ---------------
1536
+ // --- Borders ---
1537
+ // ---------------
1458
1538
  /**
1459
1539
  * Border Radius
1460
1540
  * @see https://tailwindcss.com/docs/border-radius
1461
1541
  */
1462
1542
  rounded: [{
1463
- rounded: [borderRadius]
1543
+ rounded: scaleRadius()
1464
1544
  }],
1465
1545
  /**
1466
1546
  * Border Radius Start
1467
1547
  * @see https://tailwindcss.com/docs/border-radius
1468
1548
  */
1469
1549
  "rounded-s": [{
1470
- "rounded-s": [borderRadius]
1550
+ "rounded-s": scaleRadius()
1471
1551
  }],
1472
1552
  /**
1473
1553
  * Border Radius End
1474
1554
  * @see https://tailwindcss.com/docs/border-radius
1475
1555
  */
1476
1556
  "rounded-e": [{
1477
- "rounded-e": [borderRadius]
1557
+ "rounded-e": scaleRadius()
1478
1558
  }],
1479
1559
  /**
1480
1560
  * Border Radius Top
1481
1561
  * @see https://tailwindcss.com/docs/border-radius
1482
1562
  */
1483
1563
  "rounded-t": [{
1484
- "rounded-t": [borderRadius]
1564
+ "rounded-t": scaleRadius()
1485
1565
  }],
1486
1566
  /**
1487
1567
  * Border Radius Right
1488
1568
  * @see https://tailwindcss.com/docs/border-radius
1489
1569
  */
1490
1570
  "rounded-r": [{
1491
- "rounded-r": [borderRadius]
1571
+ "rounded-r": scaleRadius()
1492
1572
  }],
1493
1573
  /**
1494
1574
  * Border Radius Bottom
1495
1575
  * @see https://tailwindcss.com/docs/border-radius
1496
1576
  */
1497
1577
  "rounded-b": [{
1498
- "rounded-b": [borderRadius]
1578
+ "rounded-b": scaleRadius()
1499
1579
  }],
1500
1580
  /**
1501
1581
  * Border Radius Left
1502
1582
  * @see https://tailwindcss.com/docs/border-radius
1503
1583
  */
1504
1584
  "rounded-l": [{
1505
- "rounded-l": [borderRadius]
1585
+ "rounded-l": scaleRadius()
1506
1586
  }],
1507
1587
  /**
1508
1588
  * Border Radius Start Start
1509
1589
  * @see https://tailwindcss.com/docs/border-radius
1510
1590
  */
1511
1591
  "rounded-ss": [{
1512
- "rounded-ss": [borderRadius]
1592
+ "rounded-ss": scaleRadius()
1513
1593
  }],
1514
1594
  /**
1515
1595
  * Border Radius Start End
1516
1596
  * @see https://tailwindcss.com/docs/border-radius
1517
1597
  */
1518
1598
  "rounded-se": [{
1519
- "rounded-se": [borderRadius]
1599
+ "rounded-se": scaleRadius()
1520
1600
  }],
1521
1601
  /**
1522
1602
  * Border Radius End End
1523
1603
  * @see https://tailwindcss.com/docs/border-radius
1524
1604
  */
1525
1605
  "rounded-ee": [{
1526
- "rounded-ee": [borderRadius]
1606
+ "rounded-ee": scaleRadius()
1527
1607
  }],
1528
1608
  /**
1529
1609
  * Border Radius End Start
1530
1610
  * @see https://tailwindcss.com/docs/border-radius
1531
1611
  */
1532
1612
  "rounded-es": [{
1533
- "rounded-es": [borderRadius]
1613
+ "rounded-es": scaleRadius()
1534
1614
  }],
1535
1615
  /**
1536
1616
  * Border Radius Top Left
1537
1617
  * @see https://tailwindcss.com/docs/border-radius
1538
1618
  */
1539
1619
  "rounded-tl": [{
1540
- "rounded-tl": [borderRadius]
1620
+ "rounded-tl": scaleRadius()
1541
1621
  }],
1542
1622
  /**
1543
1623
  * Border Radius Top Right
1544
1624
  * @see https://tailwindcss.com/docs/border-radius
1545
1625
  */
1546
1626
  "rounded-tr": [{
1547
- "rounded-tr": [borderRadius]
1627
+ "rounded-tr": scaleRadius()
1548
1628
  }],
1549
1629
  /**
1550
1630
  * Border Radius Bottom Right
1551
1631
  * @see https://tailwindcss.com/docs/border-radius
1552
1632
  */
1553
1633
  "rounded-br": [{
1554
- "rounded-br": [borderRadius]
1634
+ "rounded-br": scaleRadius()
1555
1635
  }],
1556
1636
  /**
1557
1637
  * Border Radius Bottom Left
1558
1638
  * @see https://tailwindcss.com/docs/border-radius
1559
1639
  */
1560
1640
  "rounded-bl": [{
1561
- "rounded-bl": [borderRadius]
1641
+ "rounded-bl": scaleRadius()
1562
1642
  }],
1563
1643
  /**
1564
1644
  * Border Width
1565
1645
  * @see https://tailwindcss.com/docs/border-width
1566
1646
  */
1567
1647
  "border-w": [{
1568
- border: [borderWidth]
1648
+ border: scaleBorderWidth()
1569
1649
  }],
1570
1650
  /**
1571
1651
  * Border Width X
1572
1652
  * @see https://tailwindcss.com/docs/border-width
1573
1653
  */
1574
1654
  "border-w-x": [{
1575
- "border-x": [borderWidth]
1655
+ "border-x": scaleBorderWidth()
1576
1656
  }],
1577
1657
  /**
1578
1658
  * Border Width Y
1579
1659
  * @see https://tailwindcss.com/docs/border-width
1580
1660
  */
1581
1661
  "border-w-y": [{
1582
- "border-y": [borderWidth]
1662
+ "border-y": scaleBorderWidth()
1583
1663
  }],
1584
1664
  /**
1585
1665
  * Border Width Start
1586
1666
  * @see https://tailwindcss.com/docs/border-width
1587
1667
  */
1588
1668
  "border-w-s": [{
1589
- "border-s": [borderWidth]
1669
+ "border-s": scaleBorderWidth()
1590
1670
  }],
1591
1671
  /**
1592
1672
  * Border Width End
1593
1673
  * @see https://tailwindcss.com/docs/border-width
1594
1674
  */
1595
1675
  "border-w-e": [{
1596
- "border-e": [borderWidth]
1676
+ "border-e": scaleBorderWidth()
1597
1677
  }],
1598
1678
  /**
1599
1679
  * Border Width Top
1600
1680
  * @see https://tailwindcss.com/docs/border-width
1601
1681
  */
1602
1682
  "border-w-t": [{
1603
- "border-t": [borderWidth]
1683
+ "border-t": scaleBorderWidth()
1604
1684
  }],
1605
1685
  /**
1606
1686
  * Border Width Right
1607
1687
  * @see https://tailwindcss.com/docs/border-width
1608
1688
  */
1609
1689
  "border-w-r": [{
1610
- "border-r": [borderWidth]
1690
+ "border-r": scaleBorderWidth()
1611
1691
  }],
1612
1692
  /**
1613
1693
  * Border Width Bottom
1614
1694
  * @see https://tailwindcss.com/docs/border-width
1615
1695
  */
1616
1696
  "border-w-b": [{
1617
- "border-b": [borderWidth]
1697
+ "border-b": scaleBorderWidth()
1618
1698
  }],
1619
1699
  /**
1620
1700
  * Border Width Left
1621
1701
  * @see https://tailwindcss.com/docs/border-width
1622
1702
  */
1623
1703
  "border-w-l": [{
1624
- "border-l": [borderWidth]
1625
- }],
1626
- /**
1627
- * Border Opacity
1628
- * @see https://tailwindcss.com/docs/border-opacity
1629
- */
1630
- "border-opacity": [{
1631
- "border-opacity": [opacity]
1632
- }],
1633
- /**
1634
- * Border Style
1635
- * @see https://tailwindcss.com/docs/border-style
1636
- */
1637
- "border-style": [{
1638
- border: [...getLineStyles(), "hidden"]
1704
+ "border-l": scaleBorderWidth()
1639
1705
  }],
1640
1706
  /**
1641
1707
  * Divide Width X
1642
- * @see https://tailwindcss.com/docs/divide-width
1708
+ * @see https://tailwindcss.com/docs/border-width#between-children
1643
1709
  */
1644
1710
  "divide-x": [{
1645
- "divide-x": [borderWidth]
1711
+ "divide-x": scaleBorderWidth()
1646
1712
  }],
1647
1713
  /**
1648
1714
  * Divide Width X Reverse
1649
- * @see https://tailwindcss.com/docs/divide-width
1715
+ * @see https://tailwindcss.com/docs/border-width#between-children
1650
1716
  */
1651
1717
  "divide-x-reverse": ["divide-x-reverse"],
1652
1718
  /**
1653
1719
  * Divide Width Y
1654
- * @see https://tailwindcss.com/docs/divide-width
1720
+ * @see https://tailwindcss.com/docs/border-width#between-children
1655
1721
  */
1656
1722
  "divide-y": [{
1657
- "divide-y": [borderWidth]
1723
+ "divide-y": scaleBorderWidth()
1658
1724
  }],
1659
1725
  /**
1660
1726
  * Divide Width Y Reverse
1661
- * @see https://tailwindcss.com/docs/divide-width
1727
+ * @see https://tailwindcss.com/docs/border-width#between-children
1662
1728
  */
1663
1729
  "divide-y-reverse": ["divide-y-reverse"],
1664
1730
  /**
1665
- * Divide Opacity
1666
- * @see https://tailwindcss.com/docs/divide-opacity
1731
+ * Border Style
1732
+ * @see https://tailwindcss.com/docs/border-style
1667
1733
  */
1668
- "divide-opacity": [{
1669
- "divide-opacity": [opacity]
1734
+ "border-style": [{
1735
+ border: [...scaleLineStyle(), "hidden", "none"]
1670
1736
  }],
1671
1737
  /**
1672
1738
  * Divide Style
1673
- * @see https://tailwindcss.com/docs/divide-style
1739
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
1674
1740
  */
1675
1741
  "divide-style": [{
1676
- divide: getLineStyles()
1742
+ divide: [...scaleLineStyle(), "hidden", "none"]
1677
1743
  }],
1678
1744
  /**
1679
1745
  * Border Color
1680
1746
  * @see https://tailwindcss.com/docs/border-color
1681
1747
  */
1682
1748
  "border-color": [{
1683
- border: [borderColor]
1749
+ border: scaleColor()
1684
1750
  }],
1685
1751
  /**
1686
1752
  * Border Color X
1687
1753
  * @see https://tailwindcss.com/docs/border-color
1688
1754
  */
1689
1755
  "border-color-x": [{
1690
- "border-x": [borderColor]
1756
+ "border-x": scaleColor()
1691
1757
  }],
1692
1758
  /**
1693
1759
  * Border Color Y
1694
1760
  * @see https://tailwindcss.com/docs/border-color
1695
1761
  */
1696
1762
  "border-color-y": [{
1697
- "border-y": [borderColor]
1763
+ "border-y": scaleColor()
1698
1764
  }],
1699
1765
  /**
1700
1766
  * Border Color S
1701
1767
  * @see https://tailwindcss.com/docs/border-color
1702
1768
  */
1703
1769
  "border-color-s": [{
1704
- "border-s": [borderColor]
1770
+ "border-s": scaleColor()
1705
1771
  }],
1706
1772
  /**
1707
1773
  * Border Color E
1708
1774
  * @see https://tailwindcss.com/docs/border-color
1709
1775
  */
1710
1776
  "border-color-e": [{
1711
- "border-e": [borderColor]
1777
+ "border-e": scaleColor()
1712
1778
  }],
1713
1779
  /**
1714
1780
  * Border Color Top
1715
1781
  * @see https://tailwindcss.com/docs/border-color
1716
1782
  */
1717
1783
  "border-color-t": [{
1718
- "border-t": [borderColor]
1784
+ "border-t": scaleColor()
1719
1785
  }],
1720
1786
  /**
1721
1787
  * Border Color Right
1722
1788
  * @see https://tailwindcss.com/docs/border-color
1723
1789
  */
1724
1790
  "border-color-r": [{
1725
- "border-r": [borderColor]
1791
+ "border-r": scaleColor()
1726
1792
  }],
1727
1793
  /**
1728
1794
  * Border Color Bottom
1729
1795
  * @see https://tailwindcss.com/docs/border-color
1730
1796
  */
1731
1797
  "border-color-b": [{
1732
- "border-b": [borderColor]
1798
+ "border-b": scaleColor()
1733
1799
  }],
1734
1800
  /**
1735
1801
  * Border Color Left
1736
1802
  * @see https://tailwindcss.com/docs/border-color
1737
1803
  */
1738
1804
  "border-color-l": [{
1739
- "border-l": [borderColor]
1805
+ "border-l": scaleColor()
1740
1806
  }],
1741
1807
  /**
1742
1808
  * Divide Color
1743
1809
  * @see https://tailwindcss.com/docs/divide-color
1744
1810
  */
1745
1811
  "divide-color": [{
1746
- divide: [borderColor]
1812
+ divide: scaleColor()
1747
1813
  }],
1748
1814
  /**
1749
1815
  * Outline Style
1750
1816
  * @see https://tailwindcss.com/docs/outline-style
1751
1817
  */
1752
1818
  "outline-style": [{
1753
- outline: ["", ...getLineStyles()]
1819
+ outline: [...scaleLineStyle(), "none", "hidden"]
1754
1820
  }],
1755
1821
  /**
1756
1822
  * Outline Offset
1757
1823
  * @see https://tailwindcss.com/docs/outline-offset
1758
1824
  */
1759
1825
  "outline-offset": [{
1760
- "outline-offset": [isLength, isArbitraryValue]
1826
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
1761
1827
  }],
1762
1828
  /**
1763
1829
  * Outline Width
1764
1830
  * @see https://tailwindcss.com/docs/outline-width
1765
1831
  */
1766
1832
  "outline-w": [{
1767
- outline: [isLength, isArbitraryLength]
1833
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
1768
1834
  }],
1769
1835
  /**
1770
1836
  * Outline Color
1771
1837
  * @see https://tailwindcss.com/docs/outline-color
1772
1838
  */
1773
1839
  "outline-color": [{
1774
- outline: [colors]
1840
+ outline: [themeColor]
1841
+ }],
1842
+ // ---------------
1843
+ // --- Effects ---
1844
+ // ---------------
1845
+ /**
1846
+ * Box Shadow
1847
+ * @see https://tailwindcss.com/docs/box-shadow
1848
+ */
1849
+ shadow: [{
1850
+ shadow: [
1851
+ // Deprecated since Tailwind CSS v4.0.0
1852
+ "",
1853
+ "none",
1854
+ themeShadow,
1855
+ isArbitraryVariableShadow,
1856
+ isArbitraryShadow
1857
+ ]
1858
+ }],
1859
+ /**
1860
+ * Box Shadow Color
1861
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
1862
+ */
1863
+ "shadow-color": [{
1864
+ shadow: scaleColor()
1865
+ }],
1866
+ /**
1867
+ * Inset Box Shadow
1868
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
1869
+ */
1870
+ "inset-shadow": [{
1871
+ "inset-shadow": ["none", isArbitraryVariable, isArbitraryValue, themeInsetShadow]
1872
+ }],
1873
+ /**
1874
+ * Inset Box Shadow Color
1875
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
1876
+ */
1877
+ "inset-shadow-color": [{
1878
+ "inset-shadow": scaleColor()
1775
1879
  }],
1776
1880
  /**
1777
1881
  * Ring Width
1778
- * @see https://tailwindcss.com/docs/ring-width
1882
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
1779
1883
  */
1780
1884
  "ring-w": [{
1781
- ring: getLengthWithEmptyAndArbitrary()
1885
+ ring: scaleBorderWidth()
1782
1886
  }],
1783
1887
  /**
1784
1888
  * Ring Width Inset
1785
- * @see https://tailwindcss.com/docs/ring-width
1889
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
1890
+ * @deprecated since Tailwind CSS v4.0.0
1891
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1786
1892
  */
1787
1893
  "ring-w-inset": ["ring-inset"],
1788
1894
  /**
1789
1895
  * Ring Color
1790
- * @see https://tailwindcss.com/docs/ring-color
1896
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
1791
1897
  */
1792
1898
  "ring-color": [{
1793
- ring: [colors]
1794
- }],
1795
- /**
1796
- * Ring Opacity
1797
- * @see https://tailwindcss.com/docs/ring-opacity
1798
- */
1799
- "ring-opacity": [{
1800
- "ring-opacity": [opacity]
1899
+ ring: scaleColor()
1801
1900
  }],
1802
1901
  /**
1803
1902
  * Ring Offset Width
1804
- * @see https://tailwindcss.com/docs/ring-offset-width
1903
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
1904
+ * @deprecated since Tailwind CSS v4.0.0
1905
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1805
1906
  */
1806
1907
  "ring-offset-w": [{
1807
- "ring-offset": [isLength, isArbitraryLength]
1908
+ "ring-offset": [isNumber, isArbitraryLength]
1808
1909
  }],
1809
1910
  /**
1810
1911
  * Ring Offset Color
1811
- * @see https://tailwindcss.com/docs/ring-offset-color
1912
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
1913
+ * @deprecated since Tailwind CSS v4.0.0
1914
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1812
1915
  */
1813
1916
  "ring-offset-color": [{
1814
- "ring-offset": [colors]
1917
+ "ring-offset": scaleColor()
1815
1918
  }],
1816
- // Effects
1817
1919
  /**
1818
- * Box Shadow
1819
- * @see https://tailwindcss.com/docs/box-shadow
1920
+ * Inset Ring Width
1921
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
1820
1922
  */
1821
- shadow: [{
1822
- shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
1923
+ "inset-ring-w": [{
1924
+ "inset-ring": scaleBorderWidth()
1823
1925
  }],
1824
1926
  /**
1825
- * Box Shadow Color
1826
- * @see https://tailwindcss.com/docs/box-shadow-color
1927
+ * Inset Ring Color
1928
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
1827
1929
  */
1828
- "shadow-color": [{
1829
- shadow: [isAny]
1930
+ "inset-ring-color": [{
1931
+ "inset-ring": scaleColor()
1830
1932
  }],
1831
1933
  /**
1832
1934
  * Opacity
1833
1935
  * @see https://tailwindcss.com/docs/opacity
1834
1936
  */
1835
1937
  opacity: [{
1836
- opacity: [opacity]
1938
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
1837
1939
  }],
1838
1940
  /**
1839
1941
  * Mix Blend Mode
1840
1942
  * @see https://tailwindcss.com/docs/mix-blend-mode
1841
1943
  */
1842
1944
  "mix-blend": [{
1843
- "mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
1945
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
1844
1946
  }],
1845
1947
  /**
1846
1948
  * Background Blend Mode
1847
1949
  * @see https://tailwindcss.com/docs/background-blend-mode
1848
1950
  */
1849
1951
  "bg-blend": [{
1850
- "bg-blend": getBlendModes()
1952
+ "bg-blend": scaleBlendMode()
1851
1953
  }],
1852
- // Filters
1954
+ // ---------------
1955
+ // --- Filters ---
1956
+ // ---------------
1853
1957
  /**
1854
1958
  * Filter
1855
- * @deprecated since Tailwind CSS v3.0.0
1856
1959
  * @see https://tailwindcss.com/docs/filter
1857
1960
  */
1858
1961
  filter: [{
1859
- filter: ["", "none"]
1962
+ filter: [
1963
+ // Deprecated since Tailwind CSS v3.0.0
1964
+ "",
1965
+ "none",
1966
+ isArbitraryVariable,
1967
+ isArbitraryValue
1968
+ ]
1860
1969
  }],
1861
1970
  /**
1862
1971
  * Blur
1863
1972
  * @see https://tailwindcss.com/docs/blur
1864
1973
  */
1865
1974
  blur: [{
1866
- blur: [blur]
1975
+ blur: scaleBlur()
1867
1976
  }],
1868
1977
  /**
1869
1978
  * Brightness
1870
1979
  * @see https://tailwindcss.com/docs/brightness
1871
1980
  */
1872
1981
  brightness: [{
1873
- brightness: [brightness]
1982
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
1874
1983
  }],
1875
1984
  /**
1876
1985
  * Contrast
1877
1986
  * @see https://tailwindcss.com/docs/contrast
1878
1987
  */
1879
1988
  contrast: [{
1880
- contrast: [contrast]
1989
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
1881
1990
  }],
1882
1991
  /**
1883
1992
  * Drop Shadow
1884
1993
  * @see https://tailwindcss.com/docs/drop-shadow
1885
1994
  */
1886
1995
  "drop-shadow": [{
1887
- "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
1996
+ "drop-shadow": [
1997
+ // Deprecated since Tailwind CSS v4.0.0
1998
+ "",
1999
+ "none",
2000
+ themeDropShadow,
2001
+ isArbitraryVariable,
2002
+ isArbitraryValue
2003
+ ]
1888
2004
  }],
1889
2005
  /**
1890
2006
  * Grayscale
1891
2007
  * @see https://tailwindcss.com/docs/grayscale
1892
2008
  */
1893
2009
  grayscale: [{
1894
- grayscale: [grayscale]
2010
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1895
2011
  }],
1896
2012
  /**
1897
2013
  * Hue Rotate
1898
2014
  * @see https://tailwindcss.com/docs/hue-rotate
1899
2015
  */
1900
2016
  "hue-rotate": [{
1901
- "hue-rotate": [hueRotate]
2017
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
1902
2018
  }],
1903
2019
  /**
1904
2020
  * Invert
1905
2021
  * @see https://tailwindcss.com/docs/invert
1906
2022
  */
1907
2023
  invert: [{
1908
- invert: [invert]
2024
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1909
2025
  }],
1910
2026
  /**
1911
2027
  * Saturate
1912
2028
  * @see https://tailwindcss.com/docs/saturate
1913
2029
  */
1914
2030
  saturate: [{
1915
- saturate: [saturate]
2031
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
1916
2032
  }],
1917
2033
  /**
1918
2034
  * Sepia
1919
2035
  * @see https://tailwindcss.com/docs/sepia
1920
2036
  */
1921
2037
  sepia: [{
1922
- sepia: [sepia]
2038
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1923
2039
  }],
1924
2040
  /**
1925
2041
  * Backdrop Filter
1926
- * @deprecated since Tailwind CSS v3.0.0
1927
2042
  * @see https://tailwindcss.com/docs/backdrop-filter
1928
2043
  */
1929
2044
  "backdrop-filter": [{
1930
- "backdrop-filter": ["", "none"]
2045
+ "backdrop-filter": [
2046
+ // Deprecated since Tailwind CSS v3.0.0
2047
+ "",
2048
+ "none",
2049
+ isArbitraryVariable,
2050
+ isArbitraryValue
2051
+ ]
1931
2052
  }],
1932
2053
  /**
1933
2054
  * Backdrop Blur
1934
2055
  * @see https://tailwindcss.com/docs/backdrop-blur
1935
2056
  */
1936
2057
  "backdrop-blur": [{
1937
- "backdrop-blur": [blur]
2058
+ "backdrop-blur": scaleBlur()
1938
2059
  }],
1939
2060
  /**
1940
2061
  * Backdrop Brightness
1941
2062
  * @see https://tailwindcss.com/docs/backdrop-brightness
1942
2063
  */
1943
2064
  "backdrop-brightness": [{
1944
- "backdrop-brightness": [brightness]
2065
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
1945
2066
  }],
1946
2067
  /**
1947
2068
  * Backdrop Contrast
1948
2069
  * @see https://tailwindcss.com/docs/backdrop-contrast
1949
2070
  */
1950
2071
  "backdrop-contrast": [{
1951
- "backdrop-contrast": [contrast]
2072
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
1952
2073
  }],
1953
2074
  /**
1954
2075
  * Backdrop Grayscale
1955
2076
  * @see https://tailwindcss.com/docs/backdrop-grayscale
1956
2077
  */
1957
2078
  "backdrop-grayscale": [{
1958
- "backdrop-grayscale": [grayscale]
2079
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
1959
2080
  }],
1960
2081
  /**
1961
2082
  * Backdrop Hue Rotate
1962
2083
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1963
2084
  */
1964
2085
  "backdrop-hue-rotate": [{
1965
- "backdrop-hue-rotate": [hueRotate]
2086
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
1966
2087
  }],
1967
2088
  /**
1968
2089
  * Backdrop Invert
1969
2090
  * @see https://tailwindcss.com/docs/backdrop-invert
1970
2091
  */
1971
2092
  "backdrop-invert": [{
1972
- "backdrop-invert": [invert]
2093
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
1973
2094
  }],
1974
2095
  /**
1975
2096
  * Backdrop Opacity
1976
2097
  * @see https://tailwindcss.com/docs/backdrop-opacity
1977
2098
  */
1978
2099
  "backdrop-opacity": [{
1979
- "backdrop-opacity": [opacity]
2100
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
1980
2101
  }],
1981
2102
  /**
1982
2103
  * Backdrop Saturate
1983
2104
  * @see https://tailwindcss.com/docs/backdrop-saturate
1984
2105
  */
1985
2106
  "backdrop-saturate": [{
1986
- "backdrop-saturate": [saturate]
2107
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
1987
2108
  }],
1988
2109
  /**
1989
2110
  * Backdrop Sepia
1990
2111
  * @see https://tailwindcss.com/docs/backdrop-sepia
1991
2112
  */
1992
2113
  "backdrop-sepia": [{
1993
- "backdrop-sepia": [sepia]
2114
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
1994
2115
  }],
1995
- // Tables
2116
+ // --------------
2117
+ // --- Tables ---
2118
+ // --------------
1996
2119
  /**
1997
2120
  * Border Collapse
1998
2121
  * @see https://tailwindcss.com/docs/border-collapse
@@ -2005,21 +2128,21 @@ const getDefaultConfig = () => {
2005
2128
  * @see https://tailwindcss.com/docs/border-spacing
2006
2129
  */
2007
2130
  "border-spacing": [{
2008
- "border-spacing": [borderSpacing]
2131
+ "border-spacing": scaleUnambiguousSpacing()
2009
2132
  }],
2010
2133
  /**
2011
2134
  * Border Spacing X
2012
2135
  * @see https://tailwindcss.com/docs/border-spacing
2013
2136
  */
2014
2137
  "border-spacing-x": [{
2015
- "border-spacing-x": [borderSpacing]
2138
+ "border-spacing-x": scaleUnambiguousSpacing()
2016
2139
  }],
2017
2140
  /**
2018
2141
  * Border Spacing Y
2019
2142
  * @see https://tailwindcss.com/docs/border-spacing
2020
2143
  */
2021
2144
  "border-spacing-y": [{
2022
- "border-spacing-y": [borderSpacing]
2145
+ "border-spacing-y": scaleUnambiguousSpacing()
2023
2146
  }],
2024
2147
  /**
2025
2148
  * Table Layout
@@ -2035,120 +2158,220 @@ const getDefaultConfig = () => {
2035
2158
  caption: [{
2036
2159
  caption: ["top", "bottom"]
2037
2160
  }],
2038
- // Transitions and Animation
2161
+ // ---------------------------------
2162
+ // --- Transitions and Animation ---
2163
+ // ---------------------------------
2039
2164
  /**
2040
- * Tranisition Property
2165
+ * Transition Property
2041
2166
  * @see https://tailwindcss.com/docs/transition-property
2042
2167
  */
2043
2168
  transition: [{
2044
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
2169
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
2170
+ }],
2171
+ /**
2172
+ * Transition Behavior
2173
+ * @see https://tailwindcss.com/docs/transition-behavior
2174
+ */
2175
+ "transition-behavior": [{
2176
+ transition: ["normal", "discrete"]
2045
2177
  }],
2046
2178
  /**
2047
2179
  * Transition Duration
2048
2180
  * @see https://tailwindcss.com/docs/transition-duration
2049
2181
  */
2050
2182
  duration: [{
2051
- duration: getNumberAndArbitrary()
2183
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
2052
2184
  }],
2053
2185
  /**
2054
2186
  * Transition Timing Function
2055
2187
  * @see https://tailwindcss.com/docs/transition-timing-function
2056
2188
  */
2057
2189
  ease: [{
2058
- ease: ["linear", "in", "out", "in-out", isArbitraryValue]
2190
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
2059
2191
  }],
2060
2192
  /**
2061
2193
  * Transition Delay
2062
2194
  * @see https://tailwindcss.com/docs/transition-delay
2063
2195
  */
2064
2196
  delay: [{
2065
- delay: getNumberAndArbitrary()
2197
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2066
2198
  }],
2067
2199
  /**
2068
2200
  * Animation
2069
2201
  * @see https://tailwindcss.com/docs/animation
2070
2202
  */
2071
2203
  animate: [{
2072
- animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
2204
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
2073
2205
  }],
2074
- // Transforms
2206
+ // ------------------
2207
+ // --- Transforms ---
2208
+ // ------------------
2075
2209
  /**
2076
- * Transform
2077
- * @see https://tailwindcss.com/docs/transform
2210
+ * Backface Visibility
2211
+ * @see https://tailwindcss.com/docs/backface-visibility
2078
2212
  */
2079
- transform: [{
2080
- transform: ["", "gpu", "none"]
2213
+ backface: [{
2214
+ backface: ["hidden", "visible"]
2215
+ }],
2216
+ /**
2217
+ * Perspective
2218
+ * @see https://tailwindcss.com/docs/perspective
2219
+ */
2220
+ perspective: [{
2221
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2222
+ }],
2223
+ /**
2224
+ * Perspective Origin
2225
+ * @see https://tailwindcss.com/docs/perspective-origin
2226
+ */
2227
+ "perspective-origin": [{
2228
+ "perspective-origin": scaleOrigin()
2229
+ }],
2230
+ /**
2231
+ * Rotate
2232
+ * @see https://tailwindcss.com/docs/rotate
2233
+ */
2234
+ rotate: [{
2235
+ rotate: scaleRotate()
2236
+ }],
2237
+ /**
2238
+ * Rotate X
2239
+ * @see https://tailwindcss.com/docs/rotate
2240
+ */
2241
+ "rotate-x": [{
2242
+ "rotate-x": scaleRotate()
2243
+ }],
2244
+ /**
2245
+ * Rotate Y
2246
+ * @see https://tailwindcss.com/docs/rotate
2247
+ */
2248
+ "rotate-y": [{
2249
+ "rotate-y": scaleRotate()
2250
+ }],
2251
+ /**
2252
+ * Rotate Z
2253
+ * @see https://tailwindcss.com/docs/rotate
2254
+ */
2255
+ "rotate-z": [{
2256
+ "rotate-z": scaleRotate()
2081
2257
  }],
2082
2258
  /**
2083
2259
  * Scale
2084
2260
  * @see https://tailwindcss.com/docs/scale
2085
2261
  */
2086
2262
  scale: [{
2087
- scale: [scale]
2263
+ scale: scaleScale()
2088
2264
  }],
2089
2265
  /**
2090
2266
  * Scale X
2091
2267
  * @see https://tailwindcss.com/docs/scale
2092
2268
  */
2093
2269
  "scale-x": [{
2094
- "scale-x": [scale]
2270
+ "scale-x": scaleScale()
2095
2271
  }],
2096
2272
  /**
2097
2273
  * Scale Y
2098
2274
  * @see https://tailwindcss.com/docs/scale
2099
2275
  */
2100
2276
  "scale-y": [{
2101
- "scale-y": [scale]
2277
+ "scale-y": scaleScale()
2102
2278
  }],
2103
2279
  /**
2104
- * Rotate
2105
- * @see https://tailwindcss.com/docs/rotate
2280
+ * Scale Z
2281
+ * @see https://tailwindcss.com/docs/scale
2106
2282
  */
2107
- rotate: [{
2108
- rotate: [isInteger, isArbitraryValue]
2283
+ "scale-z": [{
2284
+ "scale-z": scaleScale()
2109
2285
  }],
2110
2286
  /**
2111
- * Translate X
2112
- * @see https://tailwindcss.com/docs/translate
2287
+ * Scale 3D
2288
+ * @see https://tailwindcss.com/docs/scale
2113
2289
  */
2114
- "translate-x": [{
2115
- "translate-x": [translate]
2116
- }],
2290
+ "scale-3d": ["scale-3d"],
2117
2291
  /**
2118
- * Translate Y
2119
- * @see https://tailwindcss.com/docs/translate
2292
+ * Skew
2293
+ * @see https://tailwindcss.com/docs/skew
2120
2294
  */
2121
- "translate-y": [{
2122
- "translate-y": [translate]
2295
+ skew: [{
2296
+ skew: scaleSkew()
2123
2297
  }],
2124
2298
  /**
2125
2299
  * Skew X
2126
2300
  * @see https://tailwindcss.com/docs/skew
2127
2301
  */
2128
2302
  "skew-x": [{
2129
- "skew-x": [skew]
2303
+ "skew-x": scaleSkew()
2130
2304
  }],
2131
2305
  /**
2132
2306
  * Skew Y
2133
2307
  * @see https://tailwindcss.com/docs/skew
2134
2308
  */
2135
2309
  "skew-y": [{
2136
- "skew-y": [skew]
2310
+ "skew-y": scaleSkew()
2311
+ }],
2312
+ /**
2313
+ * Transform
2314
+ * @see https://tailwindcss.com/docs/transform
2315
+ */
2316
+ transform: [{
2317
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
2137
2318
  }],
2138
2319
  /**
2139
2320
  * Transform Origin
2140
2321
  * @see https://tailwindcss.com/docs/transform-origin
2141
2322
  */
2142
2323
  "transform-origin": [{
2143
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
2324
+ origin: scaleOrigin()
2325
+ }],
2326
+ /**
2327
+ * Transform Style
2328
+ * @see https://tailwindcss.com/docs/transform-style
2329
+ */
2330
+ "transform-style": [{
2331
+ transform: ["3d", "flat"]
2332
+ }],
2333
+ /**
2334
+ * Translate
2335
+ * @see https://tailwindcss.com/docs/translate
2336
+ */
2337
+ translate: [{
2338
+ translate: scaleTranslate()
2339
+ }],
2340
+ /**
2341
+ * Translate X
2342
+ * @see https://tailwindcss.com/docs/translate
2343
+ */
2344
+ "translate-x": [{
2345
+ "translate-x": scaleTranslate()
2346
+ }],
2347
+ /**
2348
+ * Translate Y
2349
+ * @see https://tailwindcss.com/docs/translate
2350
+ */
2351
+ "translate-y": [{
2352
+ "translate-y": scaleTranslate()
2353
+ }],
2354
+ /**
2355
+ * Translate Z
2356
+ * @see https://tailwindcss.com/docs/translate
2357
+ */
2358
+ "translate-z": [{
2359
+ "translate-z": scaleTranslate()
2144
2360
  }],
2145
- // Interactivity
2361
+ /**
2362
+ * Translate None
2363
+ * @see https://tailwindcss.com/docs/translate
2364
+ */
2365
+ "translate-none": ["translate-none"],
2366
+ // ---------------------
2367
+ // --- Interactivity ---
2368
+ // ---------------------
2146
2369
  /**
2147
2370
  * Accent Color
2148
2371
  * @see https://tailwindcss.com/docs/accent-color
2149
2372
  */
2150
2373
  accent: [{
2151
- accent: ["auto", colors]
2374
+ accent: scaleColor()
2152
2375
  }],
2153
2376
  /**
2154
2377
  * Appearance
@@ -2157,33 +2380,47 @@ const getDefaultConfig = () => {
2157
2380
  appearance: [{
2158
2381
  appearance: ["none", "auto"]
2159
2382
  }],
2383
+ /**
2384
+ * Caret Color
2385
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2386
+ */
2387
+ "caret-color": [{
2388
+ caret: scaleColor()
2389
+ }],
2390
+ /**
2391
+ * Color Scheme
2392
+ * @see https://tailwindcss.com/docs/color-scheme
2393
+ */
2394
+ "color-scheme": [{
2395
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
2396
+ }],
2160
2397
  /**
2161
2398
  * Cursor
2162
2399
  * @see https://tailwindcss.com/docs/cursor
2163
2400
  */
2164
2401
  cursor: [{
2165
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
2402
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryVariable, isArbitraryValue]
2166
2403
  }],
2167
2404
  /**
2168
- * Caret Color
2169
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2405
+ * Field Sizing
2406
+ * @see https://tailwindcss.com/docs/field-sizing
2170
2407
  */
2171
- "caret-color": [{
2172
- caret: [colors]
2408
+ "field-sizing": [{
2409
+ "field-sizing": ["fixed", "content"]
2173
2410
  }],
2174
2411
  /**
2175
2412
  * Pointer Events
2176
2413
  * @see https://tailwindcss.com/docs/pointer-events
2177
2414
  */
2178
2415
  "pointer-events": [{
2179
- "pointer-events": ["none", "auto"]
2416
+ "pointer-events": ["auto", "none"]
2180
2417
  }],
2181
2418
  /**
2182
2419
  * Resize
2183
2420
  * @see https://tailwindcss.com/docs/resize
2184
2421
  */
2185
2422
  resize: [{
2186
- resize: ["none", "y", "x", ""]
2423
+ resize: ["none", "", "y", "x"]
2187
2424
  }],
2188
2425
  /**
2189
2426
  * Scroll Behavior
@@ -2197,126 +2434,126 @@ const getDefaultConfig = () => {
2197
2434
  * @see https://tailwindcss.com/docs/scroll-margin
2198
2435
  */
2199
2436
  "scroll-m": [{
2200
- "scroll-m": getSpacingWithArbitrary()
2437
+ "scroll-m": scaleUnambiguousSpacing()
2201
2438
  }],
2202
2439
  /**
2203
2440
  * Scroll Margin X
2204
2441
  * @see https://tailwindcss.com/docs/scroll-margin
2205
2442
  */
2206
2443
  "scroll-mx": [{
2207
- "scroll-mx": getSpacingWithArbitrary()
2444
+ "scroll-mx": scaleUnambiguousSpacing()
2208
2445
  }],
2209
2446
  /**
2210
2447
  * Scroll Margin Y
2211
2448
  * @see https://tailwindcss.com/docs/scroll-margin
2212
2449
  */
2213
2450
  "scroll-my": [{
2214
- "scroll-my": getSpacingWithArbitrary()
2451
+ "scroll-my": scaleUnambiguousSpacing()
2215
2452
  }],
2216
2453
  /**
2217
2454
  * Scroll Margin Start
2218
2455
  * @see https://tailwindcss.com/docs/scroll-margin
2219
2456
  */
2220
2457
  "scroll-ms": [{
2221
- "scroll-ms": getSpacingWithArbitrary()
2458
+ "scroll-ms": scaleUnambiguousSpacing()
2222
2459
  }],
2223
2460
  /**
2224
2461
  * Scroll Margin End
2225
2462
  * @see https://tailwindcss.com/docs/scroll-margin
2226
2463
  */
2227
2464
  "scroll-me": [{
2228
- "scroll-me": getSpacingWithArbitrary()
2465
+ "scroll-me": scaleUnambiguousSpacing()
2229
2466
  }],
2230
2467
  /**
2231
2468
  * Scroll Margin Top
2232
2469
  * @see https://tailwindcss.com/docs/scroll-margin
2233
2470
  */
2234
2471
  "scroll-mt": [{
2235
- "scroll-mt": getSpacingWithArbitrary()
2472
+ "scroll-mt": scaleUnambiguousSpacing()
2236
2473
  }],
2237
2474
  /**
2238
2475
  * Scroll Margin Right
2239
2476
  * @see https://tailwindcss.com/docs/scroll-margin
2240
2477
  */
2241
2478
  "scroll-mr": [{
2242
- "scroll-mr": getSpacingWithArbitrary()
2479
+ "scroll-mr": scaleUnambiguousSpacing()
2243
2480
  }],
2244
2481
  /**
2245
2482
  * Scroll Margin Bottom
2246
2483
  * @see https://tailwindcss.com/docs/scroll-margin
2247
2484
  */
2248
2485
  "scroll-mb": [{
2249
- "scroll-mb": getSpacingWithArbitrary()
2486
+ "scroll-mb": scaleUnambiguousSpacing()
2250
2487
  }],
2251
2488
  /**
2252
2489
  * Scroll Margin Left
2253
2490
  * @see https://tailwindcss.com/docs/scroll-margin
2254
2491
  */
2255
2492
  "scroll-ml": [{
2256
- "scroll-ml": getSpacingWithArbitrary()
2493
+ "scroll-ml": scaleUnambiguousSpacing()
2257
2494
  }],
2258
2495
  /**
2259
2496
  * Scroll Padding
2260
2497
  * @see https://tailwindcss.com/docs/scroll-padding
2261
2498
  */
2262
2499
  "scroll-p": [{
2263
- "scroll-p": getSpacingWithArbitrary()
2500
+ "scroll-p": scaleUnambiguousSpacing()
2264
2501
  }],
2265
2502
  /**
2266
2503
  * Scroll Padding X
2267
2504
  * @see https://tailwindcss.com/docs/scroll-padding
2268
2505
  */
2269
2506
  "scroll-px": [{
2270
- "scroll-px": getSpacingWithArbitrary()
2507
+ "scroll-px": scaleUnambiguousSpacing()
2271
2508
  }],
2272
2509
  /**
2273
2510
  * Scroll Padding Y
2274
2511
  * @see https://tailwindcss.com/docs/scroll-padding
2275
2512
  */
2276
2513
  "scroll-py": [{
2277
- "scroll-py": getSpacingWithArbitrary()
2514
+ "scroll-py": scaleUnambiguousSpacing()
2278
2515
  }],
2279
2516
  /**
2280
2517
  * Scroll Padding Start
2281
2518
  * @see https://tailwindcss.com/docs/scroll-padding
2282
2519
  */
2283
2520
  "scroll-ps": [{
2284
- "scroll-ps": getSpacingWithArbitrary()
2521
+ "scroll-ps": scaleUnambiguousSpacing()
2285
2522
  }],
2286
2523
  /**
2287
2524
  * Scroll Padding End
2288
2525
  * @see https://tailwindcss.com/docs/scroll-padding
2289
2526
  */
2290
2527
  "scroll-pe": [{
2291
- "scroll-pe": getSpacingWithArbitrary()
2528
+ "scroll-pe": scaleUnambiguousSpacing()
2292
2529
  }],
2293
2530
  /**
2294
2531
  * Scroll Padding Top
2295
2532
  * @see https://tailwindcss.com/docs/scroll-padding
2296
2533
  */
2297
2534
  "scroll-pt": [{
2298
- "scroll-pt": getSpacingWithArbitrary()
2535
+ "scroll-pt": scaleUnambiguousSpacing()
2299
2536
  }],
2300
2537
  /**
2301
2538
  * Scroll Padding Right
2302
2539
  * @see https://tailwindcss.com/docs/scroll-padding
2303
2540
  */
2304
2541
  "scroll-pr": [{
2305
- "scroll-pr": getSpacingWithArbitrary()
2542
+ "scroll-pr": scaleUnambiguousSpacing()
2306
2543
  }],
2307
2544
  /**
2308
2545
  * Scroll Padding Bottom
2309
2546
  * @see https://tailwindcss.com/docs/scroll-padding
2310
2547
  */
2311
2548
  "scroll-pb": [{
2312
- "scroll-pb": getSpacingWithArbitrary()
2549
+ "scroll-pb": scaleUnambiguousSpacing()
2313
2550
  }],
2314
2551
  /**
2315
2552
  * Scroll Padding Left
2316
2553
  * @see https://tailwindcss.com/docs/scroll-padding
2317
2554
  */
2318
2555
  "scroll-pl": [{
2319
- "scroll-pl": getSpacingWithArbitrary()
2556
+ "scroll-pl": scaleUnambiguousSpacing()
2320
2557
  }],
2321
2558
  /**
2322
2559
  * Scroll Snap Align
@@ -2384,36 +2621,35 @@ const getDefaultConfig = () => {
2384
2621
  * @see https://tailwindcss.com/docs/will-change
2385
2622
  */
2386
2623
  "will-change": [{
2387
- "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
2624
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
2388
2625
  }],
2389
- // SVG
2626
+ // -----------
2627
+ // --- SVG ---
2628
+ // -----------
2390
2629
  /**
2391
2630
  * Fill
2392
2631
  * @see https://tailwindcss.com/docs/fill
2393
2632
  */
2394
2633
  fill: [{
2395
- fill: [colors, "none"]
2634
+ fill: ["none", ...scaleColor()]
2396
2635
  }],
2397
2636
  /**
2398
2637
  * Stroke Width
2399
2638
  * @see https://tailwindcss.com/docs/stroke-width
2400
2639
  */
2401
2640
  "stroke-w": [{
2402
- stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2641
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
2403
2642
  }],
2404
2643
  /**
2405
2644
  * Stroke
2406
2645
  * @see https://tailwindcss.com/docs/stroke
2407
2646
  */
2408
2647
  stroke: [{
2409
- stroke: [colors, "none"]
2648
+ stroke: ["none", ...scaleColor()]
2410
2649
  }],
2411
- // Accessibility
2412
- /**
2413
- * Screen Readers
2414
- * @see https://tailwindcss.com/docs/screen-readers
2415
- */
2416
- sr: ["sr-only", "not-sr-only"],
2650
+ // ---------------------
2651
+ // --- Accessibility ---
2652
+ // ---------------------
2417
2653
  /**
2418
2654
  * Forced Color Adjust
2419
2655
  * @see https://tailwindcss.com/docs/forced-color-adjust
@@ -2459,6 +2695,8 @@ const getDefaultConfig = () => {
2459
2695
  "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2460
2696
  "border-color-x": ["border-color-r", "border-color-l"],
2461
2697
  "border-color-y": ["border-color-t", "border-color-b"],
2698
+ translate: ["translate-x", "translate-y", "translate-none"],
2699
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
2462
2700
  "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2463
2701
  "scroll-mx": ["scroll-mr", "scroll-ml"],
2464
2702
  "scroll-my": ["scroll-mt", "scroll-mb"],
@@ -2472,27 +2710,30 @@ const getDefaultConfig = () => {
2472
2710
  },
2473
2711
  conflictingClassGroupModifiers: {
2474
2712
  "font-size": ["leading"]
2475
- }
2713
+ },
2714
+ orderSensitiveModifiers: ["before", "after", "placeholder", "file", "marker", "selection", "first-line", "first-letter", "backdrop", "*", "**"]
2476
2715
  };
2477
2716
  };
2478
2717
  const mergeConfigs = (baseConfig, {
2479
2718
  cacheSize,
2480
2719
  prefix,
2481
- separator,
2482
2720
  experimentalParseClassName,
2483
2721
  extend = {},
2484
2722
  override = {}
2485
2723
  }) => {
2486
2724
  overrideProperty(baseConfig, "cacheSize", cacheSize);
2487
2725
  overrideProperty(baseConfig, "prefix", prefix);
2488
- overrideProperty(baseConfig, "separator", separator);
2489
2726
  overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
2490
- for (const configKey in override) {
2491
- overrideConfigProperties(baseConfig[configKey], override[configKey]);
2492
- }
2493
- for (const key in extend) {
2494
- mergeConfigProperties(baseConfig[key], extend[key]);
2495
- }
2727
+ overrideConfigProperties(baseConfig.theme, override.theme);
2728
+ overrideConfigProperties(baseConfig.classGroups, override.classGroups);
2729
+ overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);
2730
+ overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);
2731
+ overrideProperty(baseConfig, "orderSensitiveModifiers", override.orderSensitiveModifiers);
2732
+ mergeConfigProperties(baseConfig.theme, extend.theme);
2733
+ mergeConfigProperties(baseConfig.classGroups, extend.classGroups);
2734
+ mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);
2735
+ mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);
2736
+ mergeArrayProperties(baseConfig, extend, "orderSensitiveModifiers");
2496
2737
  return baseConfig;
2497
2738
  };
2498
2739
  const overrideProperty = (baseObject, overrideKey, overrideValue) => {
@@ -2510,13 +2751,16 @@ const overrideConfigProperties = (baseObject, overrideObject) => {
2510
2751
  const mergeConfigProperties = (baseObject, mergeObject) => {
2511
2752
  if (mergeObject) {
2512
2753
  for (const key in mergeObject) {
2513
- const mergeValue = mergeObject[key];
2514
- if (mergeValue !== void 0) {
2515
- baseObject[key] = (baseObject[key] || []).concat(mergeValue);
2516
- }
2754
+ mergeArrayProperties(baseObject, mergeObject, key);
2517
2755
  }
2518
2756
  }
2519
2757
  };
2758
+ const mergeArrayProperties = (baseObject, mergeObject, key) => {
2759
+ const mergeValue = mergeObject[key];
2760
+ if (mergeValue !== void 0) {
2761
+ baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;
2762
+ }
2763
+ };
2520
2764
  const extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
2521
2765
  const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
2522
2766
  var ie = { twMerge: true, twMergeConfig: {}, responsiveVariants: false }, x = (s) => s || void 0, N = (...s) => x(y(s).filter(Boolean).join(" ")), R = null, v = {}, q = false, M = (...s) => (b$1) => b$1.twMerge ? ((!R || q) && (q = false, R = u(v) ? twMerge : extendTailwindMerge({ ...v, extend: { theme: v.theme, classGroups: v.classGroups, conflictingClassGroupModifiers: v.conflictingClassGroupModifiers, conflictingClassGroups: v.conflictingClassGroups, ...v.extend } })), x(R(N(s)))) : N(s), _ = (s, b) => {