tailwind_merge 1.1.0 → 1.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +12 -0
- data/lib/tailwind_merge/config.rb +181 -48
- data/lib/tailwind_merge/validators.rb +15 -19
- data/lib/tailwind_merge/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ceeee90371decde955283bda7c8fd9a7199fee27df0e6be6668ac1c2b61b441
|
4
|
+
data.tar.gz: 824a08e451eb452722483e18bc9e24b7eacefd0627bc3e6ecc3a8aa2655a5f5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77fee0fb6c3e17c2c9bed2c47f7996716dc36e042c01cffc5c68a1e1d80ae18aa78339ff0522527b6bf53899a06dd7efeea133640954d42c7c2b5a49778149ce
|
7
|
+
data.tar.gz: ae13784b989a225eb436ca40565dc8a022366229b7a97c58c2135b328392fa12ed29c0ce8dc3af4b222858149dc68b0bba310e983f19a897e814dcc24a6cb576
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# [v1.2.0] - 07-04-2025
|
2
|
+
## What's Changed
|
3
|
+
* Support TailwindCSS v4.1 by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/58
|
4
|
+
|
5
|
+
|
6
|
+
**Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v1.1.1...v1.2.0
|
7
|
+
# [v1.1.1] - 01-04-2025
|
8
|
+
## What's Changed
|
9
|
+
* fix length variable not being detected via classes by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/56
|
10
|
+
|
11
|
+
|
12
|
+
**Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v1.1.0...v1.1.1
|
1
13
|
# [v1.1.0] - 10-03-2025
|
2
14
|
## What's Changed
|
3
15
|
* Add and utilities for grid-column and grid-row by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/54
|
@@ -19,6 +19,7 @@ module TailwindMerge
|
|
19
19
|
"radius",
|
20
20
|
"shadow",
|
21
21
|
"inset-shadow",
|
22
|
+
"text-shadow",
|
22
23
|
"drop-shadow",
|
23
24
|
"blur",
|
24
25
|
"perspective",
|
@@ -37,17 +38,26 @@ module TailwindMerge
|
|
37
38
|
SCALE_BREAK = -> { ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"] }
|
38
39
|
SCALE_POSITION = -> {
|
39
40
|
[
|
40
|
-
"bottom",
|
41
41
|
"center",
|
42
|
+
"top",
|
43
|
+
"bottom",
|
42
44
|
"left",
|
43
|
-
"left-bottom",
|
44
|
-
"left-top",
|
45
45
|
"right",
|
46
|
-
"
|
46
|
+
"top-left",
|
47
|
+
# Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
48
|
+
"left-top",
|
49
|
+
"top-right",
|
50
|
+
# Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
47
51
|
"right-top",
|
48
|
-
"
|
52
|
+
"bottom-right",
|
53
|
+
# Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
54
|
+
"right-bottom",
|
55
|
+
"bottom-left",
|
56
|
+
# Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
57
|
+
"left-bottom",
|
49
58
|
]
|
50
59
|
}
|
60
|
+
SCALE_POSITION_WITH_ARBITRARY = -> { [*SCALE_POSITION.call, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
51
61
|
SCALE_OVERFLOW = -> { ["auto", "hidden", "clip", "visible", "scroll"] }
|
52
62
|
SCALE_OVERSCROLL = -> { ["auto", "contain", "none"] }
|
53
63
|
SCALE_UNAMBIGUOUS_SPACING = -> { [IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE, THEME_SPACING] }
|
@@ -72,8 +82,8 @@ module TailwindMerge
|
|
72
82
|
}
|
73
83
|
SCALE_GRID_COL_ROW_START_OR_END = -> { [IS_INTEGER, "auto", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
74
84
|
SCALE_GRID_AUTO_COLS_ROWS = -> { ["auto", "min", "max", "fr", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
75
|
-
SCALE_ALIGN_PRIMARY_AXIS = -> { ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline"] }
|
76
|
-
SCALE_ALIGN_SECONDARY_AXIS = -> { ["start", "end", "center", "stretch"] }
|
85
|
+
SCALE_ALIGN_PRIMARY_AXIS = -> { ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-sage"] }
|
86
|
+
SCALE_ALIGN_SECONDARY_AXIS = -> { ["start", "end", "center", "stretch", "center-safe", "end-safe"] }
|
77
87
|
SCALE_MARGIN = -> { ["auto", *SCALE_UNAMBIGUOUS_SPACING.call] }
|
78
88
|
SCALE_SIZING = -> {
|
79
89
|
[
|
@@ -93,7 +103,10 @@ module TailwindMerge
|
|
93
103
|
]
|
94
104
|
}
|
95
105
|
SCALE_COLOR = -> { [THEME_COLOR, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
96
|
-
|
106
|
+
SCALE_BG_POSITION = -> { [*SCALE_POSITION.call, IS_ARBITRARY_VARIABLE_POSITION, IS_ARBITRARY_POSITION, "position" => [IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE]] }
|
107
|
+
SCALE_BG_REPEAT = -> { ["no-repeat", "repeat" => ["", "x", "y", "space", "round"]] }
|
108
|
+
SCALE_BG_SIZE = -> { ["auto", "cover", "contain", IS_ARBITRARY_VARIABLE_SIZE, IS_ARBITRARY_SIZE, "size" => [IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE]] }
|
109
|
+
SCALE_GRADIENT_STOP_POSITION = -> { [IS_PERCENT, IS_ARBITRARY_VARIABLE_LENGTH, IS_ARBITRARY_LENGTH] }
|
97
110
|
SCALE_RADIUS = -> {
|
98
111
|
[
|
99
112
|
# Deprecated since Tailwind CSS v4.0.0
|
@@ -127,6 +140,7 @@ module TailwindMerge
|
|
127
140
|
"luminosity",
|
128
141
|
]
|
129
142
|
}
|
143
|
+
SCALE_MASK_IMAGE_POSITION = -> { [IS_NUMBER, IS_PERCENT, IS_ARBITRARY_VARIABLE_POSITION, IS_ARBITRARY_POSITION] }
|
130
144
|
SCALE_BLUR = -> {
|
131
145
|
[
|
132
146
|
"",
|
@@ -136,21 +150,7 @@ module TailwindMerge
|
|
136
150
|
IS_ARBITRARY_VALUE,
|
137
151
|
]
|
138
152
|
}
|
139
|
-
|
140
|
-
[
|
141
|
-
"center",
|
142
|
-
"top",
|
143
|
-
"top-right",
|
144
|
-
"right",
|
145
|
-
"bottom-right",
|
146
|
-
"bottom",
|
147
|
-
"bottom-left",
|
148
|
-
"left",
|
149
|
-
"top-left",
|
150
|
-
IS_ARBITRARY_VARIABLE,
|
151
|
-
IS_ARBITRARY_VALUE,
|
152
|
-
]
|
153
|
-
}
|
153
|
+
|
154
154
|
SCALE_ROTATE = -> { ["none", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
155
155
|
SCALE_SCALE = -> { ["none", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
156
156
|
SCALE_SKEW = -> { [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
@@ -188,9 +188,10 @@ module TailwindMerge
|
|
188
188
|
"shadow" => [IS_TSHIRT_SIZE],
|
189
189
|
"spacing" => ["px", IS_NUMBER],
|
190
190
|
"text" => [IS_TSHIRT_SIZE],
|
191
|
+
"text-shadow" => [IS_TSHIRT_SIZE],
|
191
192
|
"tracking" => ["tighter", "tight", "normal", "wide", "wider", "widest"],
|
192
193
|
},
|
193
|
-
class_groups: {
|
194
|
+
class_groups: {
|
194
195
|
##########
|
195
196
|
# Layout
|
196
197
|
##########
|
@@ -303,7 +304,7 @@ module TailwindMerge
|
|
303
304
|
# Object Position
|
304
305
|
# @see https://tailwindcss.com/docs/object-position
|
305
306
|
##
|
306
|
-
"object-position" => [{ "object" =>
|
307
|
+
"object-position" => [{ "object" => SCALE_POSITION_WITH_ARBITRARY.call }],
|
307
308
|
##
|
308
309
|
# Overflow
|
309
310
|
# @see https://tailwindcss.com/docs/overflow
|
@@ -545,12 +546,12 @@ module TailwindMerge
|
|
545
546
|
# Align Items
|
546
547
|
# @see https://tailwindcss.com/docs/align-items
|
547
548
|
##
|
548
|
-
"align-items" => [{ "items" => [*SCALE_ALIGN_SECONDARY_AXIS.call, "baseline"] }],
|
549
|
+
"align-items" => [{ "items" => [*SCALE_ALIGN_SECONDARY_AXIS.call, "baseline" => ["", "last"]] }],
|
549
550
|
##
|
550
551
|
# Align Self
|
551
552
|
# @see https://tailwindcss.com/docs/align-self
|
552
553
|
##
|
553
|
-
"align-self" => [{ "self" => ["auto", *SCALE_ALIGN_SECONDARY_AXIS.call, "baseline"] }],
|
554
|
+
"align-self" => [{ "self" => ["auto", *SCALE_ALIGN_SECONDARY_AXIS.call, { "baseline" => ["", "last"] }] }],
|
554
555
|
##
|
555
556
|
# Place Content
|
556
557
|
# @see https://tailwindcss.com/docs/place-content
|
@@ -703,7 +704,7 @@ module TailwindMerge
|
|
703
704
|
"min-w" => [
|
704
705
|
THEME_CONTAINER,
|
705
706
|
"screen",
|
706
|
-
# Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757
|
707
|
+
# Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 ##
|
707
708
|
"none",
|
708
709
|
*SCALE_SIZING.call,
|
709
710
|
],
|
@@ -718,9 +719,9 @@ module TailwindMerge
|
|
718
719
|
THEME_CONTAINER,
|
719
720
|
"screen",
|
720
721
|
"none",
|
721
|
-
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757
|
722
|
+
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 ##
|
722
723
|
"prose",
|
723
|
-
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757
|
724
|
+
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 ##
|
724
725
|
{ "screen" => [THEME_BREAKPOINT] },
|
725
726
|
*SCALE_SIZING.call,
|
726
727
|
],
|
@@ -850,7 +851,7 @@ module TailwindMerge
|
|
850
851
|
"leading" => [
|
851
852
|
{
|
852
853
|
"leading" => [
|
853
|
-
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757
|
854
|
+
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 ##
|
854
855
|
THEME_LEADING,
|
855
856
|
*SCALE_UNAMBIGUOUS_SPACING.call,
|
856
857
|
],
|
@@ -961,6 +962,11 @@ module TailwindMerge
|
|
961
962
|
# @see https://tailwindcss.com/docs/word-break
|
962
963
|
##
|
963
964
|
"break" => [{ "break" => ["normal", "words", "all", "keep"] }],
|
965
|
+
##
|
966
|
+
# Overflow Wrap
|
967
|
+
# @see https://tailwindcss.com/docs/overflow-wrap
|
968
|
+
##
|
969
|
+
"wrap" => [{ "wrap" => ["break-word", "anywhere", "normal"] }],
|
964
970
|
#
|
965
971
|
# Hyphens
|
966
972
|
# @see https://tailwindcss.com/docs/hyphens
|
@@ -994,17 +1000,17 @@ module TailwindMerge
|
|
994
1000
|
# Background Position
|
995
1001
|
# @see https://tailwindcss.com/docs/background-position
|
996
1002
|
##
|
997
|
-
"bg-position" => [{ "bg" =>
|
1003
|
+
"bg-position" => [{ "bg" => SCALE_BG_POSITION.call }],
|
998
1004
|
##
|
999
1005
|
# Background Repeat
|
1000
1006
|
# @see https://tailwindcss.com/docs/background-repeat
|
1001
1007
|
##
|
1002
|
-
"bg-repeat" => [{ "bg" =>
|
1008
|
+
"bg-repeat" => [{ "bg" => SCALE_BG_REPEAT.call }],
|
1003
1009
|
##
|
1004
1010
|
# Background Size
|
1005
1011
|
# @see https://tailwindcss.com/docs/background-size
|
1006
1012
|
##
|
1007
|
-
"bg-size" => [{ "bg" =>
|
1013
|
+
"bg-size" => [{ "bg" => SCALE_BG_SIZE.call }],
|
1008
1014
|
##
|
1009
1015
|
# Background Image
|
1010
1016
|
# @see https://tailwindcss.com/docs/background-image
|
@@ -1287,7 +1293,7 @@ module TailwindMerge
|
|
1287
1293
|
# Outline Color
|
1288
1294
|
# @see https://tailwindcss.com/docs/outline-color
|
1289
1295
|
##
|
1290
|
-
"outline-color" => [{ "outline" =>
|
1296
|
+
"outline-color" => [{ "outline" => SCALE_COLOR.call }],
|
1291
1297
|
|
1292
1298
|
#########
|
1293
1299
|
# Effects
|
@@ -1322,9 +1328,9 @@ module TailwindMerge
|
|
1322
1328
|
{
|
1323
1329
|
"inset-shadow" => [
|
1324
1330
|
"none",
|
1325
|
-
IS_ARBITRARY_VARIABLE,
|
1326
|
-
IS_ARBITRARY_VALUE,
|
1327
1331
|
THEME_INSET_SHADOW,
|
1332
|
+
IS_ARBITRARY_VARIABLE_SHADOW,
|
1333
|
+
IS_ARBITRARY_SHADOW,
|
1328
1334
|
],
|
1329
1335
|
},
|
1330
1336
|
],
|
@@ -1373,6 +1379,25 @@ module TailwindMerge
|
|
1373
1379
|
##
|
1374
1380
|
"inset-ring-color" => [{ "inset-ring" => SCALE_COLOR.call }],
|
1375
1381
|
##
|
1382
|
+
# Text Shadow
|
1383
|
+
# @see https://tailwindcss.com/docs/text-shadow
|
1384
|
+
##
|
1385
|
+
"text-shadow" => [
|
1386
|
+
{
|
1387
|
+
"text-shadow" => [
|
1388
|
+
"none",
|
1389
|
+
THEME_TEXT_SHADOW,
|
1390
|
+
IS_ARBITRARY_VARIABLE_SHADOW,
|
1391
|
+
IS_ARBITRARY_SHADOW,
|
1392
|
+
],
|
1393
|
+
},
|
1394
|
+
],
|
1395
|
+
##
|
1396
|
+
# Text Shadow Color
|
1397
|
+
# @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
1398
|
+
##
|
1399
|
+
"text-shadow-color" => [{ "text-shadow": SCALE_COLOR.call }],
|
1400
|
+
##
|
1376
1401
|
# Opacity
|
1377
1402
|
# @see https://tailwindcss.com/docs/opacity
|
1378
1403
|
##
|
@@ -1387,6 +1412,104 @@ module TailwindMerge
|
|
1387
1412
|
# @see https://tailwindcss.com/docs/background-blend-mode
|
1388
1413
|
##
|
1389
1414
|
"bg-blend" => [{ "bg-blend" => SCALE_BLEND_MODE.call }],
|
1415
|
+
##
|
1416
|
+
# Mask Clip
|
1417
|
+
# @see https://tailwindcss.com/docs/mask-clip
|
1418
|
+
##
|
1419
|
+
"mask-clip" => [
|
1420
|
+
{ "mask-clip" => ["border", "padding", "content", "fill", "stroke", "view"] },
|
1421
|
+
"mask-no-clip",
|
1422
|
+
],
|
1423
|
+
##
|
1424
|
+
# Mask Composite
|
1425
|
+
# @see https://tailwindcss.com/docs/mask-composite
|
1426
|
+
##
|
1427
|
+
"mask-composite" => [{ "mask" => ["add", "subtract", "intersect", "exclude"] }],
|
1428
|
+
##
|
1429
|
+
# Mask Image
|
1430
|
+
# @see https://tailwindcss.com/docs/mask-image
|
1431
|
+
##
|
1432
|
+
"mask-image-linear-pos" => [{ "mask-linear" => [Validators::IS_NUMBER] }],
|
1433
|
+
"mask-image-linear-from-pos" => [{ "mask-linear-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1434
|
+
"mask-image-linear-to-pos" => [{ "mask-linear-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1435
|
+
"mask-image-linear-from-color" => [{ "mask-linear-from": SCALE_COLOR.call }],
|
1436
|
+
"mask-image-linear-to-color" => [{ "mask-linear-to": SCALE_COLOR.call }],
|
1437
|
+
"mask-image-t-from-pos" => [{ "mask-t-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1438
|
+
"mask-image-t-to-pos" => [{ "mask-t-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1439
|
+
"mask-image-t-from-color" => [{ "mask-t-from": SCALE_COLOR.call }],
|
1440
|
+
"mask-image-t-to-color" => [{ "mask-t-to": SCALE_COLOR.call }],
|
1441
|
+
"mask-image-r-from-pos" => [{ "mask-r-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1442
|
+
"mask-image-r-to-pos" => [{ "mask-r-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1443
|
+
"mask-image-r-from-color" => [{ "mask-r-from": SCALE_COLOR.call }],
|
1444
|
+
"mask-image-r-to-color" => [{ "mask-r-to": SCALE_COLOR.call }],
|
1445
|
+
"mask-image-b-from-pos" => [{ "mask-b-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1446
|
+
"mask-image-b-to-pos" => [{ "mask-b-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1447
|
+
"mask-image-b-from-color" => [{ "mask-b-from": SCALE_COLOR.call }],
|
1448
|
+
"mask-image-b-to-color" => [{ "mask-b-to": SCALE_COLOR.call }],
|
1449
|
+
"mask-image-l-from-pos" => [{ "mask-l-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1450
|
+
"mask-image-l-to-pos" => [{ "mask-l-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1451
|
+
"mask-image-l-from-color" => [{ "mask-l-from": SCALE_COLOR.call }],
|
1452
|
+
"mask-image-l-to-color" => [{ "mask-l-to": SCALE_COLOR.call }],
|
1453
|
+
"mask-image-x-from-pos" => [{ "mask-x-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1454
|
+
"mask-image-x-to-pos" => [{ "mask-x-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1455
|
+
"mask-image-x-from-color" => [{ "mask-x-from": SCALE_COLOR.call }],
|
1456
|
+
"mask-image-x-to-color" => [{ "mask-x-to": SCALE_COLOR.call }],
|
1457
|
+
"mask-image-y-from-pos" => [{ "mask-y-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1458
|
+
"mask-image-y-to-pos" => [{ "mask-y-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1459
|
+
"mask-image-y-from-color" => [{ "mask-y-from": SCALE_COLOR.call }],
|
1460
|
+
"mask-image-y-to-color" => [{ "mask-y-to": SCALE_COLOR.call }],
|
1461
|
+
"mask-image-radial" => [{ "mask-radial" => [IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1462
|
+
"mask-image-radial-from-pos" => [{ "mask-radial-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1463
|
+
"mask-image-radial-to-pos" => [{ "mask-radial-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1464
|
+
"mask-image-radial-from-color" => [{ "mask-radial-from": SCALE_COLOR.call }],
|
1465
|
+
"mask-image-radial-to-color" => [{ "mask-radial-to": SCALE_COLOR.call }],
|
1466
|
+
"mask-image-radial-shape" => [{ "mask-radial" => ["circle", "ellipse"] }],
|
1467
|
+
"mask-image-radial-size" => [
|
1468
|
+
{ "mask-radial" => [{ "closest" => ["side", "corner"], "farthest" => ["side", "corner"] }] },
|
1469
|
+
],
|
1470
|
+
"mask-image-radial-pos" => [{ "mask-radial-at": SCALE_POSITION.call }],
|
1471
|
+
"mask-image-conic-pos" => [{ "mask-conic" => [IS_NUMBER] }],
|
1472
|
+
"mask-image-conic-from-pos" => [{ "mask-conic-from": SCALE_MASK_IMAGE_POSITION.call }],
|
1473
|
+
"mask-image-conic-to-pos" => [{ "mask-conic-to": SCALE_MASK_IMAGE_POSITION.call }],
|
1474
|
+
"mask-image-conic-from-color" => [{ "mask-conic-from": SCALE_COLOR.call }],
|
1475
|
+
"mask-image-conic-to-color" => [{ "mask-conic-to": SCALE_COLOR.call }],
|
1476
|
+
##
|
1477
|
+
# Mask Mode
|
1478
|
+
# @see https://tailwindcss.com/docs/mask-mode
|
1479
|
+
##
|
1480
|
+
"mask-mode" => [{ "mask" => ["alpha", "luminance", "match"] }],
|
1481
|
+
##
|
1482
|
+
# Mask Origin
|
1483
|
+
# @see https://tailwindcss.com/docs/mask-origin
|
1484
|
+
##
|
1485
|
+
"mask-origin" => [
|
1486
|
+
{ "mask-origin" => ["border", "padding", "content", "fill", "stroke", "view"] },
|
1487
|
+
],
|
1488
|
+
##
|
1489
|
+
# Mask Position
|
1490
|
+
# @see https://tailwindcss.com/docs/mask-position
|
1491
|
+
##
|
1492
|
+
"mask-position" => [{ "mask" => SCALE_BG_POSITION.call }],
|
1493
|
+
##
|
1494
|
+
# Mask Repeat
|
1495
|
+
# @see https://tailwindcss.com/docs/mask-repeat
|
1496
|
+
##
|
1497
|
+
"mask-repeat" => [{ "mask" => SCALE_BG_REPEAT.call }],
|
1498
|
+
##
|
1499
|
+
# Mask Size
|
1500
|
+
# @see https://tailwindcss.com/docs/mask-size
|
1501
|
+
##
|
1502
|
+
"mask-size" => [{ "mask" => SCALE_BG_SIZE.call }],
|
1503
|
+
##
|
1504
|
+
# Mask Type
|
1505
|
+
# @see https://tailwindcss.com/docs/mask-type
|
1506
|
+
##
|
1507
|
+
"mask-type" => [{ "mask-type" => ["alpha", "luminance"] }],
|
1508
|
+
##
|
1509
|
+
# Mask Image
|
1510
|
+
# @see https://tailwindcss.com/docs/mask-image
|
1511
|
+
##
|
1512
|
+
"mask-image" => [{ "mask" => ["none", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1390
1513
|
|
1391
1514
|
#########
|
1392
1515
|
# Filters
|
@@ -1434,11 +1557,16 @@ module TailwindMerge
|
|
1434
1557
|
"",
|
1435
1558
|
"none",
|
1436
1559
|
THEME_DROP_SHADOW,
|
1437
|
-
|
1438
|
-
|
1560
|
+
IS_ARBITRARY_VARIABLE_SHADOW,
|
1561
|
+
IS_ARBITRARY_SHADOW,
|
1439
1562
|
],
|
1440
1563
|
}],
|
1441
1564
|
##
|
1565
|
+
# Drop Shadow Color
|
1566
|
+
# @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
1567
|
+
##
|
1568
|
+
"drop-shadow-color" => [{ "drop-shadow": SCALE_COLOR.call }],
|
1569
|
+
##
|
1442
1570
|
# Grayscale
|
1443
1571
|
# @see https://tailwindcss.com/docs/grayscale
|
1444
1572
|
##
|
@@ -1626,7 +1754,7 @@ module TailwindMerge
|
|
1626
1754
|
# Perspective Origin
|
1627
1755
|
# @see https://tailwindcss.com/docs/perspective-origin
|
1628
1756
|
##
|
1629
|
-
"perspective-origin" => [{ "perspective-origin" =>
|
1757
|
+
"perspective-origin" => [{ "perspective-origin" => SCALE_POSITION_WITH_ARBITRARY.call }],
|
1630
1758
|
##
|
1631
1759
|
# Rotate
|
1632
1760
|
# @see https://tailwindcss.com/docs/rotate
|
@@ -1697,7 +1825,7 @@ module TailwindMerge
|
|
1697
1825
|
##
|
1698
1826
|
"transform-origin" => [
|
1699
1827
|
{
|
1700
|
-
"origin" =>
|
1828
|
+
"origin" => SCALE_POSITION_WITH_ARBITRARY.call,
|
1701
1829
|
},
|
1702
1830
|
],
|
1703
1831
|
##
|
@@ -2063,6 +2191,8 @@ module TailwindMerge
|
|
2063
2191
|
"rounded-l" => ["rounded-tl", "rounded-bl"],
|
2064
2192
|
"border-spacing" => ["border-spacing-x", "border-spacing-y"],
|
2065
2193
|
"border-w" => [
|
2194
|
+
"border-w-x",
|
2195
|
+
"border-w-y",
|
2066
2196
|
"border-w-s",
|
2067
2197
|
"border-w-e",
|
2068
2198
|
"border-w-t",
|
@@ -2073,6 +2203,8 @@ module TailwindMerge
|
|
2073
2203
|
"border-w-x" => ["border-w-r", "border-w-l"],
|
2074
2204
|
"border-w-y" => ["border-w-t", "border-w-b"],
|
2075
2205
|
"border-color" => [
|
2206
|
+
"border-color-x",
|
2207
|
+
"border-color-y",
|
2076
2208
|
"border-color-s",
|
2077
2209
|
"border-color-e",
|
2078
2210
|
"border-color-t",
|
@@ -2117,17 +2249,18 @@ module TailwindMerge
|
|
2117
2249
|
"font-size" => ["leading"],
|
2118
2250
|
},
|
2119
2251
|
order_sensitive_modifiers: [
|
2120
|
-
"
|
2252
|
+
"*",
|
2253
|
+
"**",
|
2121
2254
|
"after",
|
2122
|
-
"
|
2255
|
+
"backdrop",
|
2256
|
+
"before",
|
2257
|
+
"details-content",
|
2123
2258
|
"file",
|
2259
|
+
"first-letter",
|
2260
|
+
"first-line",
|
2124
2261
|
"marker",
|
2262
|
+
"placeholder",
|
2125
2263
|
"selection",
|
2126
|
-
"first-line",
|
2127
|
-
"first-letter",
|
2128
|
-
"backdrop",
|
2129
|
-
"*",
|
2130
|
-
"**",
|
2131
2264
|
],
|
2132
2265
|
}.freeze
|
2133
2266
|
|
@@ -111,7 +111,7 @@ module TailwindMerge
|
|
111
111
|
}
|
112
112
|
|
113
113
|
IS_ARBITRARY_SHADOW = ->(value) {
|
114
|
-
arbitrary_value?(value,
|
114
|
+
arbitrary_value?(value, IS_LABEL_SHADOW, IS_SHADOW)
|
115
115
|
}
|
116
116
|
|
117
117
|
IS_ARBITRARY_VARIABLE = ->(value) {
|
@@ -146,36 +146,32 @@ module TailwindMerge
|
|
146
146
|
# Labels
|
147
147
|
############
|
148
148
|
|
149
|
-
IS_LABEL_POSITION = ->(
|
150
|
-
|
149
|
+
IS_LABEL_POSITION = ->(label) {
|
150
|
+
label == "position" || label == "percentage"
|
151
151
|
}
|
152
152
|
|
153
|
-
|
154
|
-
|
155
|
-
IS_LABEL_IMAGE = ->(value) {
|
156
|
-
IMAGE_LABELS.include?(value)
|
153
|
+
IS_LABEL_IMAGE = ->(label) {
|
154
|
+
label == "image" || label == "url"
|
157
155
|
}
|
158
156
|
|
159
|
-
|
160
|
-
|
161
|
-
IS_LABEL_SIZE = ->(value) {
|
162
|
-
SIZE_LABELS.include?(value)
|
157
|
+
IS_LABEL_SIZE = ->(label) {
|
158
|
+
label == "length" || label == "size" || label == "bg-size"
|
163
159
|
}
|
164
160
|
|
165
|
-
IS_LABEL_LENGTH = ->(
|
166
|
-
|
161
|
+
IS_LABEL_LENGTH = ->(label) {
|
162
|
+
label == "length"
|
167
163
|
}
|
168
164
|
|
169
|
-
IS_LABEL_NUMBER = ->(
|
170
|
-
|
165
|
+
IS_LABEL_NUMBER = ->(label) {
|
166
|
+
label == "number"
|
171
167
|
}
|
172
168
|
|
173
|
-
IS_LABEL_FAMILY_NAME = ->(
|
174
|
-
|
169
|
+
IS_LABEL_FAMILY_NAME = ->(label) {
|
170
|
+
label == "family-name"
|
175
171
|
}
|
176
172
|
|
177
|
-
IS_LABEL_SHADOW = ->(
|
178
|
-
|
173
|
+
IS_LABEL_SHADOW = ->(label) {
|
174
|
+
label == "shadow"
|
179
175
|
}
|
180
176
|
end
|
181
177
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailwind_merge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sin_lru_redux
|
@@ -76,15 +76,15 @@ files:
|
|
76
76
|
- lib/tailwind_merge/version.rb
|
77
77
|
- script/test
|
78
78
|
- tailwind_merge.gemspec
|
79
|
-
homepage: https://github.com/gjtorikian/tailwind_merge/tree/v1.
|
79
|
+
homepage: https://github.com/gjtorikian/tailwind_merge/tree/v1.2.0
|
80
80
|
licenses:
|
81
81
|
- MIT
|
82
82
|
metadata:
|
83
|
-
homepage_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.
|
84
|
-
source_code_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.
|
85
|
-
changelog_uri: https://github.com/gjtorikian/tailwind_merge/blob/v1.
|
83
|
+
homepage_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.2.0
|
84
|
+
source_code_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.2.0
|
85
|
+
changelog_uri: https://github.com/gjtorikian/tailwind_merge/blob/v1.2.0/CHANGELOG.md
|
86
86
|
bug_tracker_uri: https://github.com/gjtorikian/tailwind_merge/issues
|
87
|
-
documentation_uri: https://rubydoc.info/gems/tailwind_merge/1.
|
87
|
+
documentation_uri: https://rubydoc.info/gems/tailwind_merge/1.2.0
|
88
88
|
funding_uri: https://github.com/sponsors/gjtorikian
|
89
89
|
rubygems_mfa_required: 'true'
|
90
90
|
post_install_message:
|