tailwind_merge 1.0.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 +18 -0
- data/lib/tailwind_merge/config.rb +182 -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,21 @@
|
|
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
|
13
|
+
# [v1.1.0] - 10-03-2025
|
14
|
+
## What's Changed
|
15
|
+
* Add and utilities for grid-column and grid-row by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/54
|
16
|
+
|
17
|
+
|
18
|
+
**Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v1.0.0...v1.1.0
|
1
19
|
# [v1.0.0] - 25-02-2025
|
2
20
|
## What's Changed
|
3
21
|
* Add matrix to test CI by @w-masahiro-ct in https://github.com/gjtorikian/tailwind_merge/pull/47
|
@@ -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] }
|
@@ -65,14 +75,15 @@ module TailwindMerge
|
|
65
75
|
[
|
66
76
|
"auto",
|
67
77
|
{ "span" => ["full", IS_INTEGER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] },
|
78
|
+
IS_INTEGER,
|
68
79
|
IS_ARBITRARY_VARIABLE,
|
69
80
|
IS_ARBITRARY_VALUE,
|
70
81
|
]
|
71
82
|
}
|
72
83
|
SCALE_GRID_COL_ROW_START_OR_END = -> { [IS_INTEGER, "auto", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
73
84
|
SCALE_GRID_AUTO_COLS_ROWS = -> { ["auto", "min", "max", "fr", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
74
|
-
SCALE_ALIGN_PRIMARY_AXIS = -> { ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline"] }
|
75
|
-
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"] }
|
76
87
|
SCALE_MARGIN = -> { ["auto", *SCALE_UNAMBIGUOUS_SPACING.call] }
|
77
88
|
SCALE_SIZING = -> {
|
78
89
|
[
|
@@ -92,7 +103,10 @@ module TailwindMerge
|
|
92
103
|
]
|
93
104
|
}
|
94
105
|
SCALE_COLOR = -> { [THEME_COLOR, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
95
|
-
|
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] }
|
96
110
|
SCALE_RADIUS = -> {
|
97
111
|
[
|
98
112
|
# Deprecated since Tailwind CSS v4.0.0
|
@@ -126,6 +140,7 @@ module TailwindMerge
|
|
126
140
|
"luminosity",
|
127
141
|
]
|
128
142
|
}
|
143
|
+
SCALE_MASK_IMAGE_POSITION = -> { [IS_NUMBER, IS_PERCENT, IS_ARBITRARY_VARIABLE_POSITION, IS_ARBITRARY_POSITION] }
|
129
144
|
SCALE_BLUR = -> {
|
130
145
|
[
|
131
146
|
"",
|
@@ -135,21 +150,7 @@ module TailwindMerge
|
|
135
150
|
IS_ARBITRARY_VALUE,
|
136
151
|
]
|
137
152
|
}
|
138
|
-
|
139
|
-
[
|
140
|
-
"center",
|
141
|
-
"top",
|
142
|
-
"top-right",
|
143
|
-
"right",
|
144
|
-
"bottom-right",
|
145
|
-
"bottom",
|
146
|
-
"bottom-left",
|
147
|
-
"left",
|
148
|
-
"top-left",
|
149
|
-
IS_ARBITRARY_VARIABLE,
|
150
|
-
IS_ARBITRARY_VALUE,
|
151
|
-
]
|
152
|
-
}
|
153
|
+
|
153
154
|
SCALE_ROTATE = -> { ["none", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
154
155
|
SCALE_SCALE = -> { ["none", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
155
156
|
SCALE_SKEW = -> { [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
@@ -187,9 +188,10 @@ module TailwindMerge
|
|
187
188
|
"shadow" => [IS_TSHIRT_SIZE],
|
188
189
|
"spacing" => ["px", IS_NUMBER],
|
189
190
|
"text" => [IS_TSHIRT_SIZE],
|
191
|
+
"text-shadow" => [IS_TSHIRT_SIZE],
|
190
192
|
"tracking" => ["tighter", "tight", "normal", "wide", "wider", "widest"],
|
191
193
|
},
|
192
|
-
class_groups: {
|
194
|
+
class_groups: {
|
193
195
|
##########
|
194
196
|
# Layout
|
195
197
|
##########
|
@@ -302,7 +304,7 @@ module TailwindMerge
|
|
302
304
|
# Object Position
|
303
305
|
# @see https://tailwindcss.com/docs/object-position
|
304
306
|
##
|
305
|
-
"object-position" => [{ "object" =>
|
307
|
+
"object-position" => [{ "object" => SCALE_POSITION_WITH_ARBITRARY.call }],
|
306
308
|
##
|
307
309
|
# Overflow
|
308
310
|
# @see https://tailwindcss.com/docs/overflow
|
@@ -544,12 +546,12 @@ module TailwindMerge
|
|
544
546
|
# Align Items
|
545
547
|
# @see https://tailwindcss.com/docs/align-items
|
546
548
|
##
|
547
|
-
"align-items" => [{ "items" => [*SCALE_ALIGN_SECONDARY_AXIS.call, "baseline"] }],
|
549
|
+
"align-items" => [{ "items" => [*SCALE_ALIGN_SECONDARY_AXIS.call, "baseline" => ["", "last"]] }],
|
548
550
|
##
|
549
551
|
# Align Self
|
550
552
|
# @see https://tailwindcss.com/docs/align-self
|
551
553
|
##
|
552
|
-
"align-self" => [{ "self" => ["auto", *SCALE_ALIGN_SECONDARY_AXIS.call, "baseline"] }],
|
554
|
+
"align-self" => [{ "self" => ["auto", *SCALE_ALIGN_SECONDARY_AXIS.call, { "baseline" => ["", "last"] }] }],
|
553
555
|
##
|
554
556
|
# Place Content
|
555
557
|
# @see https://tailwindcss.com/docs/place-content
|
@@ -702,7 +704,7 @@ module TailwindMerge
|
|
702
704
|
"min-w" => [
|
703
705
|
THEME_CONTAINER,
|
704
706
|
"screen",
|
705
|
-
# 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 ##
|
706
708
|
"none",
|
707
709
|
*SCALE_SIZING.call,
|
708
710
|
],
|
@@ -717,9 +719,9 @@ module TailwindMerge
|
|
717
719
|
THEME_CONTAINER,
|
718
720
|
"screen",
|
719
721
|
"none",
|
720
|
-
# 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 ##
|
721
723
|
"prose",
|
722
|
-
# 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 ##
|
723
725
|
{ "screen" => [THEME_BREAKPOINT] },
|
724
726
|
*SCALE_SIZING.call,
|
725
727
|
],
|
@@ -849,7 +851,7 @@ module TailwindMerge
|
|
849
851
|
"leading" => [
|
850
852
|
{
|
851
853
|
"leading" => [
|
852
|
-
# 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 ##
|
853
855
|
THEME_LEADING,
|
854
856
|
*SCALE_UNAMBIGUOUS_SPACING.call,
|
855
857
|
],
|
@@ -960,6 +962,11 @@ module TailwindMerge
|
|
960
962
|
# @see https://tailwindcss.com/docs/word-break
|
961
963
|
##
|
962
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"] }],
|
963
970
|
#
|
964
971
|
# Hyphens
|
965
972
|
# @see https://tailwindcss.com/docs/hyphens
|
@@ -993,17 +1000,17 @@ module TailwindMerge
|
|
993
1000
|
# Background Position
|
994
1001
|
# @see https://tailwindcss.com/docs/background-position
|
995
1002
|
##
|
996
|
-
"bg-position" => [{ "bg" =>
|
1003
|
+
"bg-position" => [{ "bg" => SCALE_BG_POSITION.call }],
|
997
1004
|
##
|
998
1005
|
# Background Repeat
|
999
1006
|
# @see https://tailwindcss.com/docs/background-repeat
|
1000
1007
|
##
|
1001
|
-
"bg-repeat" => [{ "bg" =>
|
1008
|
+
"bg-repeat" => [{ "bg" => SCALE_BG_REPEAT.call }],
|
1002
1009
|
##
|
1003
1010
|
# Background Size
|
1004
1011
|
# @see https://tailwindcss.com/docs/background-size
|
1005
1012
|
##
|
1006
|
-
"bg-size" => [{ "bg" =>
|
1013
|
+
"bg-size" => [{ "bg" => SCALE_BG_SIZE.call }],
|
1007
1014
|
##
|
1008
1015
|
# Background Image
|
1009
1016
|
# @see https://tailwindcss.com/docs/background-image
|
@@ -1286,7 +1293,7 @@ module TailwindMerge
|
|
1286
1293
|
# Outline Color
|
1287
1294
|
# @see https://tailwindcss.com/docs/outline-color
|
1288
1295
|
##
|
1289
|
-
"outline-color" => [{ "outline" =>
|
1296
|
+
"outline-color" => [{ "outline" => SCALE_COLOR.call }],
|
1290
1297
|
|
1291
1298
|
#########
|
1292
1299
|
# Effects
|
@@ -1321,9 +1328,9 @@ module TailwindMerge
|
|
1321
1328
|
{
|
1322
1329
|
"inset-shadow" => [
|
1323
1330
|
"none",
|
1324
|
-
IS_ARBITRARY_VARIABLE,
|
1325
|
-
IS_ARBITRARY_VALUE,
|
1326
1331
|
THEME_INSET_SHADOW,
|
1332
|
+
IS_ARBITRARY_VARIABLE_SHADOW,
|
1333
|
+
IS_ARBITRARY_SHADOW,
|
1327
1334
|
],
|
1328
1335
|
},
|
1329
1336
|
],
|
@@ -1372,6 +1379,25 @@ module TailwindMerge
|
|
1372
1379
|
##
|
1373
1380
|
"inset-ring-color" => [{ "inset-ring" => SCALE_COLOR.call }],
|
1374
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
|
+
##
|
1375
1401
|
# Opacity
|
1376
1402
|
# @see https://tailwindcss.com/docs/opacity
|
1377
1403
|
##
|
@@ -1386,6 +1412,104 @@ module TailwindMerge
|
|
1386
1412
|
# @see https://tailwindcss.com/docs/background-blend-mode
|
1387
1413
|
##
|
1388
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] }],
|
1389
1513
|
|
1390
1514
|
#########
|
1391
1515
|
# Filters
|
@@ -1433,11 +1557,16 @@ module TailwindMerge
|
|
1433
1557
|
"",
|
1434
1558
|
"none",
|
1435
1559
|
THEME_DROP_SHADOW,
|
1436
|
-
|
1437
|
-
|
1560
|
+
IS_ARBITRARY_VARIABLE_SHADOW,
|
1561
|
+
IS_ARBITRARY_SHADOW,
|
1438
1562
|
],
|
1439
1563
|
}],
|
1440
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
|
+
##
|
1441
1570
|
# Grayscale
|
1442
1571
|
# @see https://tailwindcss.com/docs/grayscale
|
1443
1572
|
##
|
@@ -1625,7 +1754,7 @@ module TailwindMerge
|
|
1625
1754
|
# Perspective Origin
|
1626
1755
|
# @see https://tailwindcss.com/docs/perspective-origin
|
1627
1756
|
##
|
1628
|
-
"perspective-origin" => [{ "perspective-origin" =>
|
1757
|
+
"perspective-origin" => [{ "perspective-origin" => SCALE_POSITION_WITH_ARBITRARY.call }],
|
1629
1758
|
##
|
1630
1759
|
# Rotate
|
1631
1760
|
# @see https://tailwindcss.com/docs/rotate
|
@@ -1696,7 +1825,7 @@ module TailwindMerge
|
|
1696
1825
|
##
|
1697
1826
|
"transform-origin" => [
|
1698
1827
|
{
|
1699
|
-
"origin" =>
|
1828
|
+
"origin" => SCALE_POSITION_WITH_ARBITRARY.call,
|
1700
1829
|
},
|
1701
1830
|
],
|
1702
1831
|
##
|
@@ -2062,6 +2191,8 @@ module TailwindMerge
|
|
2062
2191
|
"rounded-l" => ["rounded-tl", "rounded-bl"],
|
2063
2192
|
"border-spacing" => ["border-spacing-x", "border-spacing-y"],
|
2064
2193
|
"border-w" => [
|
2194
|
+
"border-w-x",
|
2195
|
+
"border-w-y",
|
2065
2196
|
"border-w-s",
|
2066
2197
|
"border-w-e",
|
2067
2198
|
"border-w-t",
|
@@ -2072,6 +2203,8 @@ module TailwindMerge
|
|
2072
2203
|
"border-w-x" => ["border-w-r", "border-w-l"],
|
2073
2204
|
"border-w-y" => ["border-w-t", "border-w-b"],
|
2074
2205
|
"border-color" => [
|
2206
|
+
"border-color-x",
|
2207
|
+
"border-color-y",
|
2075
2208
|
"border-color-s",
|
2076
2209
|
"border-color-e",
|
2077
2210
|
"border-color-t",
|
@@ -2116,17 +2249,18 @@ module TailwindMerge
|
|
2116
2249
|
"font-size" => ["leading"],
|
2117
2250
|
},
|
2118
2251
|
order_sensitive_modifiers: [
|
2119
|
-
"
|
2252
|
+
"*",
|
2253
|
+
"**",
|
2120
2254
|
"after",
|
2121
|
-
"
|
2255
|
+
"backdrop",
|
2256
|
+
"before",
|
2257
|
+
"details-content",
|
2122
2258
|
"file",
|
2259
|
+
"first-letter",
|
2260
|
+
"first-line",
|
2123
2261
|
"marker",
|
2262
|
+
"placeholder",
|
2124
2263
|
"selection",
|
2125
|
-
"first-line",
|
2126
|
-
"first-letter",
|
2127
|
-
"backdrop",
|
2128
|
-
"*",
|
2129
|
-
"**",
|
2130
2264
|
],
|
2131
2265
|
}.freeze
|
2132
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:
|