tailwind-merge 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/dist/bundle-cjs.js +272 -28
- package/dist/bundle-cjs.js.map +1 -1
- package/dist/bundle-mjs.mjs +272 -28
- package/dist/bundle-mjs.mjs.map +1 -1
- package/dist/es5/bundle-cjs.js +282 -30
- package/dist/es5/bundle-cjs.js.map +1 -1
- package/dist/es5/bundle-mjs.mjs +282 -30
- package/dist/es5/bundle-mjs.mjs.map +1 -1
- package/dist/types.d.ts +290 -25
- package/package.json +15 -15
- package/src/lib/default-config.ts +204 -47
- package/src/lib/types.ts +61 -2
- package/src/lib/validators.ts +7 -10
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<br />
|
|
5
5
|
<a href="https://github.com/dcastil/tailwind-merge">
|
|
6
|
-
<img src="https://github.com/dcastil/tailwind-merge/raw/v3.
|
|
6
|
+
<img src="https://github.com/dcastil/tailwind-merge/raw/v3.2.0/assets/logo.svg" alt="tailwind-merge" height="150px" />
|
|
7
7
|
</a>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
@@ -18,21 +18,21 @@ twMerge('px-2 py-1 bg-red hover:bg-dark-red', 'p-3 bg-[#B91C1C]')
|
|
|
18
18
|
// → 'hover:bg-dark-red p-3 bg-[#B91C1C]'
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
- Supports Tailwind v4.0 (if you use Tailwind v3, use [tailwind-merge v2.6.0](https://github.com/dcastil/tailwind-merge/tree/v2.6.0))
|
|
21
|
+
- Supports Tailwind v4.0 up to v4.1 (if you use Tailwind v3, use [tailwind-merge v2.6.0](https://github.com/dcastil/tailwind-merge/tree/v2.6.0))
|
|
22
22
|
- Works in all modern browsers and maintained Node versions
|
|
23
23
|
- Fully typed
|
|
24
24
|
- [Check bundle size on Bundlephobia](https://bundlephobia.com/package/tailwind-merge)
|
|
25
25
|
|
|
26
26
|
## Get started
|
|
27
27
|
|
|
28
|
-
- [What is it for](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
29
|
-
- [When and how to use it](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
30
|
-
- [Features](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
31
|
-
- [Limitations](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
32
|
-
- [Configuration](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
33
|
-
- [Recipes](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
34
|
-
- [API reference](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
35
|
-
- [Writing plugins](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
36
|
-
- [Versioning](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
37
|
-
- [Contributing](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
38
|
-
- [Similar packages](https://github.com/dcastil/tailwind-merge/tree/v3.
|
|
28
|
+
- [What is it for](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/what-is-it-for.md)
|
|
29
|
+
- [When and how to use it](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/when-and-how-to-use-it.md)
|
|
30
|
+
- [Features](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/features.md)
|
|
31
|
+
- [Limitations](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/limitations.md)
|
|
32
|
+
- [Configuration](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/configuration.md)
|
|
33
|
+
- [Recipes](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/recipes.md)
|
|
34
|
+
- [API reference](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/api-reference.md)
|
|
35
|
+
- [Writing plugins](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/writing-plugins.md)
|
|
36
|
+
- [Versioning](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/versioning.md)
|
|
37
|
+
- [Contributing](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/contributing.md)
|
|
38
|
+
- [Similar packages](https://github.com/dcastil/tailwind-merge/tree/v3.2.0/docs/similar-packages.md)
|
package/dist/bundle-cjs.js
CHANGED
|
@@ -422,8 +422,8 @@ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
|
422
422
|
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
423
423
|
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
424
424
|
const isFraction = value => fractionRegex.test(value);
|
|
425
|
-
const isNumber = value =>
|
|
426
|
-
const isInteger = value =>
|
|
425
|
+
const isNumber = value => !!value && !Number.isNaN(Number(value));
|
|
426
|
+
const isInteger = value => !!value && Number.isInteger(Number(value));
|
|
427
427
|
const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
|
|
428
428
|
const isTshirtSize = value => tshirtUnitRegex.test(value);
|
|
429
429
|
const isAny = () => true;
|
|
@@ -442,7 +442,7 @@ const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isL
|
|
|
442
442
|
const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
443
443
|
const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
444
444
|
const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
445
|
-
const isArbitraryShadow = value => getIsArbitraryValue(value,
|
|
445
|
+
const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
446
446
|
const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
|
|
447
447
|
const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
|
|
448
448
|
const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
@@ -472,11 +472,9 @@ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) =>
|
|
|
472
472
|
return false;
|
|
473
473
|
};
|
|
474
474
|
// Labels
|
|
475
|
-
const isLabelPosition = label => label === 'position';
|
|
476
|
-
const
|
|
477
|
-
const
|
|
478
|
-
const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
|
|
479
|
-
const isLabelSize = label => sizeLabels.has(label);
|
|
475
|
+
const isLabelPosition = label => label === 'position' || label === 'percentage';
|
|
476
|
+
const isLabelImage = label => label === 'image' || label === 'url';
|
|
477
|
+
const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';
|
|
480
478
|
const isLabelLength = label => label === 'length';
|
|
481
479
|
const isLabelNumber = label => label === 'number';
|
|
482
480
|
const isLabelFamilyName = label => label === 'family-name';
|
|
@@ -525,6 +523,7 @@ const getDefaultConfig = () => {
|
|
|
525
523
|
const themeRadius = fromTheme('radius');
|
|
526
524
|
const themeShadow = fromTheme('shadow');
|
|
527
525
|
const themeInsetShadow = fromTheme('inset-shadow');
|
|
526
|
+
const themeTextShadow = fromTheme('text-shadow');
|
|
528
527
|
const themeDropShadow = fromTheme('drop-shadow');
|
|
529
528
|
const themeBlur = fromTheme('blur');
|
|
530
529
|
const themePerspective = fromTheme('perspective');
|
|
@@ -539,7 +538,16 @@ const getDefaultConfig = () => {
|
|
|
539
538
|
*/
|
|
540
539
|
/***/
|
|
541
540
|
const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
|
|
542
|
-
const scalePosition = () => ['
|
|
541
|
+
const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',
|
|
542
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
543
|
+
'left-top', 'top-right',
|
|
544
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
545
|
+
'right-top', 'bottom-right',
|
|
546
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
547
|
+
'right-bottom', 'bottom-left',
|
|
548
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
549
|
+
'left-bottom'];
|
|
550
|
+
const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
|
|
543
551
|
const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
|
|
544
552
|
const scaleOverscroll = () => ['auto', 'contain', 'none'];
|
|
545
553
|
const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
|
|
@@ -550,11 +558,20 @@ const getDefaultConfig = () => {
|
|
|
550
558
|
}, isInteger, isArbitraryVariable, isArbitraryValue];
|
|
551
559
|
const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
|
|
552
560
|
const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
|
|
553
|
-
const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline'];
|
|
554
|
-
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch'];
|
|
561
|
+
const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];
|
|
562
|
+
const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
|
|
555
563
|
const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
|
|
556
564
|
const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
|
|
557
565
|
const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
|
|
566
|
+
const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
|
|
567
|
+
position: [isArbitraryVariable, isArbitraryValue]
|
|
568
|
+
}];
|
|
569
|
+
const scaleBgRepeat = () => ['no-repeat', {
|
|
570
|
+
repeat: ['', 'x', 'y', 'space', 'round']
|
|
571
|
+
}];
|
|
572
|
+
const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {
|
|
573
|
+
size: [isArbitraryVariable, isArbitraryValue]
|
|
574
|
+
}];
|
|
558
575
|
const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
|
|
559
576
|
const scaleRadius = () => [
|
|
560
577
|
// Deprecated since Tailwind CSS v4.0.0
|
|
@@ -562,10 +579,10 @@ const getDefaultConfig = () => {
|
|
|
562
579
|
const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
|
|
563
580
|
const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
|
|
564
581
|
const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
|
|
582
|
+
const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
|
|
565
583
|
const scaleBlur = () => [
|
|
566
584
|
// Deprecated since Tailwind CSS v4.0.0
|
|
567
585
|
'', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
|
|
568
|
-
const scaleOrigin = () => ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryVariable, isArbitraryValue];
|
|
569
586
|
const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
570
587
|
const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
|
|
571
588
|
const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
|
|
@@ -590,6 +607,7 @@ const getDefaultConfig = () => {
|
|
|
590
607
|
shadow: [isTshirtSize],
|
|
591
608
|
spacing: ['px', isNumber],
|
|
592
609
|
text: [isTshirtSize],
|
|
610
|
+
'text-shadow': [isTshirtSize],
|
|
593
611
|
tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
|
|
594
612
|
},
|
|
595
613
|
classGroups: {
|
|
@@ -692,7 +710,7 @@ const getDefaultConfig = () => {
|
|
|
692
710
|
* @see https://tailwindcss.com/docs/object-position
|
|
693
711
|
*/
|
|
694
712
|
'object-position': [{
|
|
695
|
-
object:
|
|
713
|
+
object: scalePositionWithArbitrary()
|
|
696
714
|
}],
|
|
697
715
|
/**
|
|
698
716
|
* Overflow
|
|
@@ -999,14 +1017,18 @@ const getDefaultConfig = () => {
|
|
|
999
1017
|
* @see https://tailwindcss.com/docs/align-items
|
|
1000
1018
|
*/
|
|
1001
1019
|
'align-items': [{
|
|
1002
|
-
items: [...scaleAlignSecondaryAxis(),
|
|
1020
|
+
items: [...scaleAlignSecondaryAxis(), {
|
|
1021
|
+
baseline: ['', 'last']
|
|
1022
|
+
}]
|
|
1003
1023
|
}],
|
|
1004
1024
|
/**
|
|
1005
1025
|
* Align Self
|
|
1006
1026
|
* @see https://tailwindcss.com/docs/align-self
|
|
1007
1027
|
*/
|
|
1008
1028
|
'align-self': [{
|
|
1009
|
-
self: ['auto', ...scaleAlignSecondaryAxis(),
|
|
1029
|
+
self: ['auto', ...scaleAlignSecondaryAxis(), {
|
|
1030
|
+
baseline: ['', 'last']
|
|
1031
|
+
}]
|
|
1010
1032
|
}],
|
|
1011
1033
|
/**
|
|
1012
1034
|
* Place Content
|
|
@@ -1451,6 +1473,13 @@ const getDefaultConfig = () => {
|
|
|
1451
1473
|
break: [{
|
|
1452
1474
|
break: ['normal', 'words', 'all', 'keep']
|
|
1453
1475
|
}],
|
|
1476
|
+
/**
|
|
1477
|
+
* Overflow Wrap
|
|
1478
|
+
* @see https://tailwindcss.com/docs/overflow-wrap
|
|
1479
|
+
*/
|
|
1480
|
+
wrap: [{
|
|
1481
|
+
wrap: ['break-word', 'anywhere', 'normal']
|
|
1482
|
+
}],
|
|
1454
1483
|
/**
|
|
1455
1484
|
* Hyphens
|
|
1456
1485
|
* @see https://tailwindcss.com/docs/hyphens
|
|
@@ -1494,23 +1523,21 @@ const getDefaultConfig = () => {
|
|
|
1494
1523
|
* @see https://tailwindcss.com/docs/background-position
|
|
1495
1524
|
*/
|
|
1496
1525
|
'bg-position': [{
|
|
1497
|
-
bg:
|
|
1526
|
+
bg: scaleBgPosition()
|
|
1498
1527
|
}],
|
|
1499
1528
|
/**
|
|
1500
1529
|
* Background Repeat
|
|
1501
1530
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
1502
1531
|
*/
|
|
1503
1532
|
'bg-repeat': [{
|
|
1504
|
-
bg:
|
|
1505
|
-
repeat: ['', 'x', 'y', 'space', 'round']
|
|
1506
|
-
}]
|
|
1533
|
+
bg: scaleBgRepeat()
|
|
1507
1534
|
}],
|
|
1508
1535
|
/**
|
|
1509
1536
|
* Background Size
|
|
1510
1537
|
* @see https://tailwindcss.com/docs/background-size
|
|
1511
1538
|
*/
|
|
1512
1539
|
'bg-size': [{
|
|
1513
|
-
bg:
|
|
1540
|
+
bg: scaleBgSize()
|
|
1514
1541
|
}],
|
|
1515
1542
|
/**
|
|
1516
1543
|
* Background Image
|
|
@@ -1879,7 +1906,7 @@ const getDefaultConfig = () => {
|
|
|
1879
1906
|
* @see https://tailwindcss.com/docs/outline-color
|
|
1880
1907
|
*/
|
|
1881
1908
|
'outline-color': [{
|
|
1882
|
-
outline:
|
|
1909
|
+
outline: scaleColor()
|
|
1883
1910
|
}],
|
|
1884
1911
|
// ---------------
|
|
1885
1912
|
// --- Effects ---
|
|
@@ -1905,7 +1932,7 @@ const getDefaultConfig = () => {
|
|
|
1905
1932
|
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
1906
1933
|
*/
|
|
1907
1934
|
'inset-shadow': [{
|
|
1908
|
-
'inset-shadow': ['none',
|
|
1935
|
+
'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
1909
1936
|
}],
|
|
1910
1937
|
/**
|
|
1911
1938
|
* Inset Box Shadow Color
|
|
@@ -1967,6 +1994,20 @@ const getDefaultConfig = () => {
|
|
|
1967
1994
|
'inset-ring-color': [{
|
|
1968
1995
|
'inset-ring': scaleColor()
|
|
1969
1996
|
}],
|
|
1997
|
+
/**
|
|
1998
|
+
* Text Shadow
|
|
1999
|
+
* @see https://tailwindcss.com/docs/text-shadow
|
|
2000
|
+
*/
|
|
2001
|
+
'text-shadow': [{
|
|
2002
|
+
'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2003
|
+
}],
|
|
2004
|
+
/**
|
|
2005
|
+
* Text Shadow Color
|
|
2006
|
+
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
2007
|
+
*/
|
|
2008
|
+
'text-shadow-color': [{
|
|
2009
|
+
'text-shadow': scaleColor()
|
|
2010
|
+
}],
|
|
1970
2011
|
/**
|
|
1971
2012
|
* Opacity
|
|
1972
2013
|
* @see https://tailwindcss.com/docs/opacity
|
|
@@ -1988,6 +2029,202 @@ const getDefaultConfig = () => {
|
|
|
1988
2029
|
'bg-blend': [{
|
|
1989
2030
|
'bg-blend': scaleBlendMode()
|
|
1990
2031
|
}],
|
|
2032
|
+
/**
|
|
2033
|
+
* Mask Clip
|
|
2034
|
+
* @see https://tailwindcss.com/docs/mask-clip
|
|
2035
|
+
*/
|
|
2036
|
+
'mask-clip': [{
|
|
2037
|
+
'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
|
|
2038
|
+
}, 'mask-no-clip'],
|
|
2039
|
+
/**
|
|
2040
|
+
* Mask Composite
|
|
2041
|
+
* @see https://tailwindcss.com/docs/mask-composite
|
|
2042
|
+
*/
|
|
2043
|
+
'mask-composite': [{
|
|
2044
|
+
mask: ['add', 'subtract', 'intersect', 'exclude']
|
|
2045
|
+
}],
|
|
2046
|
+
/**
|
|
2047
|
+
* Mask Image
|
|
2048
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2049
|
+
*/
|
|
2050
|
+
'mask-image-linear-pos': [{
|
|
2051
|
+
'mask-linear': [isNumber]
|
|
2052
|
+
}],
|
|
2053
|
+
'mask-image-linear-from-pos': [{
|
|
2054
|
+
'mask-linear-from': scaleMaskImagePosition()
|
|
2055
|
+
}],
|
|
2056
|
+
'mask-image-linear-to-pos': [{
|
|
2057
|
+
'mask-linear-to': scaleMaskImagePosition()
|
|
2058
|
+
}],
|
|
2059
|
+
'mask-image-linear-from-color': [{
|
|
2060
|
+
'mask-linear-from': scaleColor()
|
|
2061
|
+
}],
|
|
2062
|
+
'mask-image-linear-to-color': [{
|
|
2063
|
+
'mask-linear-to': scaleColor()
|
|
2064
|
+
}],
|
|
2065
|
+
'mask-image-t-from-pos': [{
|
|
2066
|
+
'mask-t-from': scaleMaskImagePosition()
|
|
2067
|
+
}],
|
|
2068
|
+
'mask-image-t-to-pos': [{
|
|
2069
|
+
'mask-t-to': scaleMaskImagePosition()
|
|
2070
|
+
}],
|
|
2071
|
+
'mask-image-t-from-color': [{
|
|
2072
|
+
'mask-t-from': scaleColor()
|
|
2073
|
+
}],
|
|
2074
|
+
'mask-image-t-to-color': [{
|
|
2075
|
+
'mask-t-to': scaleColor()
|
|
2076
|
+
}],
|
|
2077
|
+
'mask-image-r-from-pos': [{
|
|
2078
|
+
'mask-r-from': scaleMaskImagePosition()
|
|
2079
|
+
}],
|
|
2080
|
+
'mask-image-r-to-pos': [{
|
|
2081
|
+
'mask-r-to': scaleMaskImagePosition()
|
|
2082
|
+
}],
|
|
2083
|
+
'mask-image-r-from-color': [{
|
|
2084
|
+
'mask-r-from': scaleColor()
|
|
2085
|
+
}],
|
|
2086
|
+
'mask-image-r-to-color': [{
|
|
2087
|
+
'mask-r-to': scaleColor()
|
|
2088
|
+
}],
|
|
2089
|
+
'mask-image-b-from-pos': [{
|
|
2090
|
+
'mask-b-from': scaleMaskImagePosition()
|
|
2091
|
+
}],
|
|
2092
|
+
'mask-image-b-to-pos': [{
|
|
2093
|
+
'mask-b-to': scaleMaskImagePosition()
|
|
2094
|
+
}],
|
|
2095
|
+
'mask-image-b-from-color': [{
|
|
2096
|
+
'mask-b-from': scaleColor()
|
|
2097
|
+
}],
|
|
2098
|
+
'mask-image-b-to-color': [{
|
|
2099
|
+
'mask-b-to': scaleColor()
|
|
2100
|
+
}],
|
|
2101
|
+
'mask-image-l-from-pos': [{
|
|
2102
|
+
'mask-l-from': scaleMaskImagePosition()
|
|
2103
|
+
}],
|
|
2104
|
+
'mask-image-l-to-pos': [{
|
|
2105
|
+
'mask-l-to': scaleMaskImagePosition()
|
|
2106
|
+
}],
|
|
2107
|
+
'mask-image-l-from-color': [{
|
|
2108
|
+
'mask-l-from': scaleColor()
|
|
2109
|
+
}],
|
|
2110
|
+
'mask-image-l-to-color': [{
|
|
2111
|
+
'mask-l-to': scaleColor()
|
|
2112
|
+
}],
|
|
2113
|
+
'mask-image-x-from-pos': [{
|
|
2114
|
+
'mask-x-from': scaleMaskImagePosition()
|
|
2115
|
+
}],
|
|
2116
|
+
'mask-image-x-to-pos': [{
|
|
2117
|
+
'mask-x-to': scaleMaskImagePosition()
|
|
2118
|
+
}],
|
|
2119
|
+
'mask-image-x-from-color': [{
|
|
2120
|
+
'mask-x-from': scaleColor()
|
|
2121
|
+
}],
|
|
2122
|
+
'mask-image-x-to-color': [{
|
|
2123
|
+
'mask-x-to': scaleColor()
|
|
2124
|
+
}],
|
|
2125
|
+
'mask-image-y-from-pos': [{
|
|
2126
|
+
'mask-y-from': scaleMaskImagePosition()
|
|
2127
|
+
}],
|
|
2128
|
+
'mask-image-y-to-pos': [{
|
|
2129
|
+
'mask-y-to': scaleMaskImagePosition()
|
|
2130
|
+
}],
|
|
2131
|
+
'mask-image-y-from-color': [{
|
|
2132
|
+
'mask-y-from': scaleColor()
|
|
2133
|
+
}],
|
|
2134
|
+
'mask-image-y-to-color': [{
|
|
2135
|
+
'mask-y-to': scaleColor()
|
|
2136
|
+
}],
|
|
2137
|
+
'mask-image-radial': [{
|
|
2138
|
+
'mask-radial': [isArbitraryVariable, isArbitraryValue]
|
|
2139
|
+
}],
|
|
2140
|
+
'mask-image-radial-from-pos': [{
|
|
2141
|
+
'mask-radial-from': scaleMaskImagePosition()
|
|
2142
|
+
}],
|
|
2143
|
+
'mask-image-radial-to-pos': [{
|
|
2144
|
+
'mask-radial-to': scaleMaskImagePosition()
|
|
2145
|
+
}],
|
|
2146
|
+
'mask-image-radial-from-color': [{
|
|
2147
|
+
'mask-radial-from': scaleColor()
|
|
2148
|
+
}],
|
|
2149
|
+
'mask-image-radial-to-color': [{
|
|
2150
|
+
'mask-radial-to': scaleColor()
|
|
2151
|
+
}],
|
|
2152
|
+
'mask-image-radial-shape': [{
|
|
2153
|
+
'mask-radial': ['circle', 'ellipse']
|
|
2154
|
+
}],
|
|
2155
|
+
'mask-image-radial-size': [{
|
|
2156
|
+
'mask-radial': [{
|
|
2157
|
+
closest: ['side', 'corner'],
|
|
2158
|
+
farthest: ['side', 'corner']
|
|
2159
|
+
}]
|
|
2160
|
+
}],
|
|
2161
|
+
'mask-image-radial-pos': [{
|
|
2162
|
+
'mask-radial-at': scalePosition()
|
|
2163
|
+
}],
|
|
2164
|
+
'mask-image-conic-pos': [{
|
|
2165
|
+
'mask-conic': [isNumber]
|
|
2166
|
+
}],
|
|
2167
|
+
'mask-image-conic-from-pos': [{
|
|
2168
|
+
'mask-conic-from': scaleMaskImagePosition()
|
|
2169
|
+
}],
|
|
2170
|
+
'mask-image-conic-to-pos': [{
|
|
2171
|
+
'mask-conic-to': scaleMaskImagePosition()
|
|
2172
|
+
}],
|
|
2173
|
+
'mask-image-conic-from-color': [{
|
|
2174
|
+
'mask-conic-from': scaleColor()
|
|
2175
|
+
}],
|
|
2176
|
+
'mask-image-conic-to-color': [{
|
|
2177
|
+
'mask-conic-to': scaleColor()
|
|
2178
|
+
}],
|
|
2179
|
+
/**
|
|
2180
|
+
* Mask Mode
|
|
2181
|
+
* @see https://tailwindcss.com/docs/mask-mode
|
|
2182
|
+
*/
|
|
2183
|
+
'mask-mode': [{
|
|
2184
|
+
mask: ['alpha', 'luminance', 'match']
|
|
2185
|
+
}],
|
|
2186
|
+
/**
|
|
2187
|
+
* Mask Origin
|
|
2188
|
+
* @see https://tailwindcss.com/docs/mask-origin
|
|
2189
|
+
*/
|
|
2190
|
+
'mask-origin': [{
|
|
2191
|
+
'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
|
|
2192
|
+
}],
|
|
2193
|
+
/**
|
|
2194
|
+
* Mask Position
|
|
2195
|
+
* @see https://tailwindcss.com/docs/mask-position
|
|
2196
|
+
*/
|
|
2197
|
+
'mask-position': [{
|
|
2198
|
+
mask: scaleBgPosition()
|
|
2199
|
+
}],
|
|
2200
|
+
/**
|
|
2201
|
+
* Mask Repeat
|
|
2202
|
+
* @see https://tailwindcss.com/docs/mask-repeat
|
|
2203
|
+
*/
|
|
2204
|
+
'mask-repeat': [{
|
|
2205
|
+
mask: scaleBgRepeat()
|
|
2206
|
+
}],
|
|
2207
|
+
/**
|
|
2208
|
+
* Mask Size
|
|
2209
|
+
* @see https://tailwindcss.com/docs/mask-size
|
|
2210
|
+
*/
|
|
2211
|
+
'mask-size': [{
|
|
2212
|
+
mask: scaleBgSize()
|
|
2213
|
+
}],
|
|
2214
|
+
/**
|
|
2215
|
+
* Mask Type
|
|
2216
|
+
* @see https://tailwindcss.com/docs/mask-type
|
|
2217
|
+
*/
|
|
2218
|
+
'mask-type': [{
|
|
2219
|
+
'mask-type': ['alpha', 'luminance']
|
|
2220
|
+
}],
|
|
2221
|
+
/**
|
|
2222
|
+
* Mask Image
|
|
2223
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2224
|
+
*/
|
|
2225
|
+
'mask-image': [{
|
|
2226
|
+
mask: ['none', isArbitraryVariable, isArbitraryValue]
|
|
2227
|
+
}],
|
|
1991
2228
|
// ---------------
|
|
1992
2229
|
// --- Filters ---
|
|
1993
2230
|
// ---------------
|
|
@@ -2028,7 +2265,14 @@ const getDefaultConfig = () => {
|
|
|
2028
2265
|
'drop-shadow': [{
|
|
2029
2266
|
'drop-shadow': [
|
|
2030
2267
|
// Deprecated since Tailwind CSS v4.0.0
|
|
2031
|
-
'', 'none', themeDropShadow,
|
|
2268
|
+
'', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]
|
|
2269
|
+
}],
|
|
2270
|
+
/**
|
|
2271
|
+
* Drop Shadow Color
|
|
2272
|
+
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
2273
|
+
*/
|
|
2274
|
+
'drop-shadow-color': [{
|
|
2275
|
+
'drop-shadow': scaleColor()
|
|
2032
2276
|
}],
|
|
2033
2277
|
/**
|
|
2034
2278
|
* Grayscale
|
|
@@ -2249,7 +2493,7 @@ const getDefaultConfig = () => {
|
|
|
2249
2493
|
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2250
2494
|
*/
|
|
2251
2495
|
'perspective-origin': [{
|
|
2252
|
-
'perspective-origin':
|
|
2496
|
+
'perspective-origin': scalePositionWithArbitrary()
|
|
2253
2497
|
}],
|
|
2254
2498
|
/**
|
|
2255
2499
|
* Rotate
|
|
@@ -2345,7 +2589,7 @@ const getDefaultConfig = () => {
|
|
|
2345
2589
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
2346
2590
|
*/
|
|
2347
2591
|
'transform-origin': [{
|
|
2348
|
-
origin:
|
|
2592
|
+
origin: scalePositionWithArbitrary()
|
|
2349
2593
|
}],
|
|
2350
2594
|
/**
|
|
2351
2595
|
* Transform Style
|
|
@@ -2713,10 +2957,10 @@ const getDefaultConfig = () => {
|
|
|
2713
2957
|
'rounded-b': ['rounded-br', 'rounded-bl'],
|
|
2714
2958
|
'rounded-l': ['rounded-tl', 'rounded-bl'],
|
|
2715
2959
|
'border-spacing': ['border-spacing-x', 'border-spacing-y'],
|
|
2716
|
-
'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
|
2960
|
+
'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
|
|
2717
2961
|
'border-w-x': ['border-w-r', 'border-w-l'],
|
|
2718
2962
|
'border-w-y': ['border-w-t', 'border-w-b'],
|
|
2719
|
-
'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
|
2963
|
+
'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
|
|
2720
2964
|
'border-color-x': ['border-color-r', 'border-color-l'],
|
|
2721
2965
|
'border-color-y': ['border-color-t', 'border-color-b'],
|
|
2722
2966
|
translate: ['translate-x', 'translate-y', 'translate-none'],
|
|
@@ -2735,7 +2979,7 @@ const getDefaultConfig = () => {
|
|
|
2735
2979
|
conflictingClassGroupModifiers: {
|
|
2736
2980
|
'font-size': ['leading']
|
|
2737
2981
|
},
|
|
2738
|
-
orderSensitiveModifiers: ['
|
|
2982
|
+
orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']
|
|
2739
2983
|
};
|
|
2740
2984
|
};
|
|
2741
2985
|
|