@pequity/squirrel 7.0.0 → 7.0.1

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