tailwind_merge 0.16.0 → 1.0.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/CHANGELOG.md +7 -0
- data/README.md +84 -54
- data/lib/tailwind_merge/{class_utils.rb → class_group_utils.rb} +8 -29
- data/lib/tailwind_merge/config.rb +723 -418
- data/lib/tailwind_merge/parse_class_name.rb +89 -0
- data/lib/tailwind_merge/sort_modifiers.rb +31 -0
- data/lib/tailwind_merge/validators.rb +109 -45
- data/lib/tailwind_merge/version.rb +1 -1
- data/lib/tailwind_merge.rb +20 -18
- data/script/test +43 -0
- metadata +11 -9
- data/lib/tailwind_merge/modifier_utils.rb +0 -68
@@ -7,45 +7,35 @@ module TailwindMerge
|
|
7
7
|
include Validators
|
8
8
|
|
9
9
|
THEME_KEYS = [
|
10
|
-
"
|
10
|
+
"color",
|
11
|
+
"font",
|
12
|
+
"text",
|
13
|
+
"font-weight",
|
14
|
+
"tracking",
|
15
|
+
"leading",
|
16
|
+
"breakpoint",
|
17
|
+
"container",
|
11
18
|
"spacing",
|
19
|
+
"radius",
|
20
|
+
"shadow",
|
21
|
+
"inset-shadow",
|
22
|
+
"drop-shadow",
|
12
23
|
"blur",
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"border-width",
|
18
|
-
"contrast",
|
19
|
-
"grayscale",
|
20
|
-
"hue-rotate",
|
21
|
-
"invert",
|
22
|
-
"gap",
|
23
|
-
"gradient-color-stops",
|
24
|
-
"gradient-color-stop-positions",
|
25
|
-
"inset",
|
26
|
-
"margin",
|
27
|
-
"opacity",
|
28
|
-
"padding",
|
29
|
-
"saturate",
|
30
|
-
"scale",
|
31
|
-
"sepia",
|
32
|
-
"skew",
|
33
|
-
"space",
|
34
|
-
"translate",
|
24
|
+
"perspective",
|
25
|
+
"aspect",
|
26
|
+
"ease",
|
27
|
+
"animate",
|
35
28
|
].freeze
|
36
29
|
THEME_KEYS.each do |key|
|
37
|
-
const_set(key.upcase.tr("-", "_"), ->(config) {
|
30
|
+
const_set("THEME_#{key.upcase.tr("-", "_")}", ->(config) {
|
31
|
+
config[:theme].fetch(key, nil)
|
32
|
+
})
|
38
33
|
end
|
39
34
|
|
40
|
-
VALID_THEME_IDS = Set.new(THEME_KEYS.map { |theme_key| const_get(theme_key.upcase.tr("-", "_")).object_id }).freeze
|
35
|
+
VALID_THEME_IDS = Set.new(THEME_KEYS.map { |theme_key| const_get("THEME_#{theme_key.upcase.tr("-", "_")}").object_id }).freeze
|
41
36
|
|
42
|
-
|
43
|
-
|
44
|
-
SPACING_WITH_AUTO_AND_ARBITRARY = -> { ["auto", IS_ARBITRARY_VALUE, SPACING] }
|
45
|
-
SPACING_WITH_ARBITRARY = -> { [IS_ARBITRARY_VALUE, SPACING] }
|
46
|
-
LENGTH_WITH_EMPTY_AND_ARBITRARY = -> { ["", IS_LENGTH, IS_ARBITRARY_LENGTH] }
|
47
|
-
NUMBER_WITH_AUTO_AND_ARBITRARY = -> { ["auto", IS_NUMBER, IS_ARBITRARY_VALUE] }
|
48
|
-
POSITIONS = -> {
|
37
|
+
SCALE_BREAK = -> { ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"] }
|
38
|
+
SCALE_POSITION = -> {
|
49
39
|
[
|
50
40
|
"bottom",
|
51
41
|
"center",
|
@@ -58,8 +48,65 @@ module TailwindMerge
|
|
58
48
|
"top",
|
59
49
|
]
|
60
50
|
}
|
61
|
-
|
62
|
-
|
51
|
+
SCALE_OVERFLOW = -> { ["auto", "hidden", "clip", "visible", "scroll"] }
|
52
|
+
SCALE_OVERSCROLL = -> { ["auto", "contain", "none"] }
|
53
|
+
SCALE_UNAMBIGUOUS_SPACING = -> { [IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE, THEME_SPACING] }
|
54
|
+
SCALE_INSET = ->(_config) {
|
55
|
+
[
|
56
|
+
IS_FRACTION,
|
57
|
+
"full",
|
58
|
+
"auto",
|
59
|
+
*SCALE_UNAMBIGUOUS_SPACING.call,
|
60
|
+
]
|
61
|
+
}
|
62
|
+
|
63
|
+
SCALE_GRID_TEMPLATE_COLS_ROWS = -> { [IS_INTEGER, "none", "subgrid", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
64
|
+
SCALE_GRID_COL_ROW_START_AND_END = -> {
|
65
|
+
[
|
66
|
+
"auto",
|
67
|
+
{ "span" => ["full", IS_INTEGER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] },
|
68
|
+
IS_ARBITRARY_VARIABLE,
|
69
|
+
IS_ARBITRARY_VALUE,
|
70
|
+
]
|
71
|
+
}
|
72
|
+
SCALE_GRID_COL_ROW_START_OR_END = -> { [IS_INTEGER, "auto", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
73
|
+
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"] }
|
76
|
+
SCALE_MARGIN = -> { ["auto", *SCALE_UNAMBIGUOUS_SPACING.call] }
|
77
|
+
SCALE_SIZING = -> {
|
78
|
+
[
|
79
|
+
IS_FRACTION,
|
80
|
+
"auto",
|
81
|
+
"full",
|
82
|
+
"dvw",
|
83
|
+
"dvh",
|
84
|
+
"lvw",
|
85
|
+
"lvh",
|
86
|
+
"svw",
|
87
|
+
"svh",
|
88
|
+
"min",
|
89
|
+
"max",
|
90
|
+
"fit",
|
91
|
+
*SCALE_UNAMBIGUOUS_SPACING.call,
|
92
|
+
]
|
93
|
+
}
|
94
|
+
SCALE_COLOR = -> { [THEME_COLOR, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
95
|
+
SCALE_GRADIENT_STOP_POSITION = -> { [IS_PERCENT, IS_ARBITRARY_LENGTH] }
|
96
|
+
SCALE_RADIUS = -> {
|
97
|
+
[
|
98
|
+
# Deprecated since Tailwind CSS v4.0.0
|
99
|
+
"",
|
100
|
+
"none",
|
101
|
+
"full",
|
102
|
+
THEME_RADIUS,
|
103
|
+
IS_ARBITRARY_VARIABLE,
|
104
|
+
IS_ARBITRARY_VALUE,
|
105
|
+
]
|
106
|
+
}
|
107
|
+
SCALE_BORDER_WIDTH = -> { ["", IS_NUMBER, IS_ARBITRARY_VARIABLE_LENGTH, IS_ARBITRARY_LENGTH] }
|
108
|
+
SCALE_LINE_STYLE = -> { ["solid", "dashed", "dotted", "double"] }
|
109
|
+
SCALE_BLEND_MODE = -> {
|
63
110
|
[
|
64
111
|
"normal",
|
65
112
|
"multiply",
|
@@ -79,52 +126,94 @@ module TailwindMerge
|
|
79
126
|
"luminosity",
|
80
127
|
]
|
81
128
|
}
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
129
|
+
SCALE_BLUR = -> {
|
130
|
+
[
|
131
|
+
"",
|
132
|
+
"none",
|
133
|
+
THEME_BLUR,
|
134
|
+
IS_ARBITRARY_VARIABLE,
|
135
|
+
IS_ARBITRARY_VALUE,
|
136
|
+
]
|
137
|
+
}
|
138
|
+
SCALE_ORIGIN = -> {
|
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
|
+
SCALE_ROTATE = -> { ["none", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
154
|
+
SCALE_SCALE = -> { ["none", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
155
|
+
SCALE_SKEW = -> { [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
|
156
|
+
SCALE_TRANSLATE = -> { [IS_FRACTION, "full", *SCALE_UNAMBIGUOUS_SPACING.call] }
|
86
157
|
|
87
158
|
DEFAULTS = {
|
88
159
|
cache_size: 500,
|
160
|
+
prefix: nil,
|
89
161
|
ignore_empty_cache: true,
|
90
|
-
separator: ":",
|
91
162
|
theme: {
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"blur" => [
|
95
|
-
"
|
96
|
-
"
|
97
|
-
"
|
98
|
-
"
|
99
|
-
"
|
100
|
-
"
|
101
|
-
"
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
"
|
113
|
-
"
|
114
|
-
"
|
115
|
-
"
|
116
|
-
"
|
163
|
+
"animate" => ["spin", "ping", "pulse", "bounce"],
|
164
|
+
"aspect" => ["video"],
|
165
|
+
"blur" => [IS_TSHIRT_SIZE],
|
166
|
+
"breakpoint" => [IS_TSHIRT_SIZE],
|
167
|
+
"color" => [IS_ANY],
|
168
|
+
"container" => [IS_TSHIRT_SIZE],
|
169
|
+
"drop-shadow" => [IS_TSHIRT_SIZE],
|
170
|
+
"ease" => ["in", "out", "in-out"],
|
171
|
+
"font" => [IS_ANY_NON_ARBITRARY],
|
172
|
+
"font-weight" => [
|
173
|
+
"thin",
|
174
|
+
"extralight",
|
175
|
+
"light",
|
176
|
+
"normal",
|
177
|
+
"medium",
|
178
|
+
"semibold",
|
179
|
+
"bold",
|
180
|
+
"extrabold",
|
181
|
+
"black",
|
182
|
+
],
|
183
|
+
"inset-shadow" => [IS_TSHIRT_SIZE],
|
184
|
+
"leading" => ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
185
|
+
"perspective" => ["dramatic", "near", "normal", "midrange", "distant", "none"],
|
186
|
+
"radius" => [IS_TSHIRT_SIZE],
|
187
|
+
"shadow" => [IS_TSHIRT_SIZE],
|
188
|
+
"spacing" => ["px", IS_NUMBER],
|
189
|
+
"text" => [IS_TSHIRT_SIZE],
|
190
|
+
"tracking" => ["tighter", "tight", "normal", "wide", "wider", "widest"],
|
117
191
|
},
|
118
192
|
class_groups: { # rubocop:disable Metrics/CollectionLiteralLength
|
193
|
+
##########
|
119
194
|
# Layout
|
195
|
+
##########
|
196
|
+
|
120
197
|
##
|
121
198
|
# Aspect Ratio
|
122
199
|
# @see https://tailwindcss.com/docs/aspect-ratio
|
123
200
|
##
|
124
|
-
"aspect" => [
|
201
|
+
"aspect" => [
|
202
|
+
{
|
203
|
+
"aspect" => [
|
204
|
+
"auto",
|
205
|
+
"square",
|
206
|
+
IS_FRACTION,
|
207
|
+
IS_ARBITRARY_VALUE,
|
208
|
+
IS_ARBITRARY_VARIABLE,
|
209
|
+
THEME_ASPECT,
|
210
|
+
],
|
211
|
+
},
|
212
|
+
],
|
125
213
|
##
|
126
214
|
# Container
|
127
215
|
# @see https://tailwindcss.com/docs/container
|
216
|
+
# @deprecated since Tailwind CSS v4.0.0
|
128
217
|
##
|
129
218
|
"container" => ["container"],
|
130
219
|
##
|
@@ -136,12 +225,12 @@ module TailwindMerge
|
|
136
225
|
# Break After
|
137
226
|
# @see https://tailwindcss.com/docs/break-after
|
138
227
|
##
|
139
|
-
"break-after" => [{ "break-after" =>
|
228
|
+
"break-after" => [{ "break-after" => SCALE_BREAK.call }],
|
140
229
|
##
|
141
230
|
# Break Before
|
142
231
|
# @see https://tailwindcss.com/docs/break-before
|
143
232
|
##
|
144
|
-
"break-before" => [{ "break-before" =>
|
233
|
+
"break-before" => [{ "break-before" => SCALE_BREAK.call }],
|
145
234
|
##
|
146
235
|
# Break Inside
|
147
236
|
# @see https://tailwindcss.com/docs/break-inside
|
@@ -185,6 +274,11 @@ module TailwindMerge
|
|
185
274
|
"hidden",
|
186
275
|
],
|
187
276
|
##
|
277
|
+
# Screen Reader Only
|
278
|
+
# @see https://tailwindcss.com/docs/display#screen-reader-only
|
279
|
+
##
|
280
|
+
"sr" => ["sr-only", "not-sr-only"],
|
281
|
+
##
|
188
282
|
# Floats
|
189
283
|
# @see https://tailwindcss.com/docs/float
|
190
284
|
##
|
@@ -208,37 +302,37 @@ module TailwindMerge
|
|
208
302
|
# Object Position
|
209
303
|
# @see https://tailwindcss.com/docs/object-position
|
210
304
|
##
|
211
|
-
"object-position" => [{ "object" => [*
|
305
|
+
"object-position" => [{ "object" => [*SCALE_POSITION.call, IS_ARBITRARY_VALUE, Validators::IS_ARBITRARY_VARIABLE] }],
|
212
306
|
##
|
213
307
|
# Overflow
|
214
308
|
# @see https://tailwindcss.com/docs/overflow
|
215
309
|
##
|
216
|
-
"overflow" => [{ "overflow" =>
|
310
|
+
"overflow" => [{ "overflow" => SCALE_OVERFLOW.call }],
|
217
311
|
##
|
218
312
|
# Overflow X
|
219
313
|
# @see https://tailwindcss.com/docs/overflow
|
220
314
|
##
|
221
|
-
"overflow-x" => [{ "overflow-x" =>
|
315
|
+
"overflow-x" => [{ "overflow-x" => SCALE_OVERFLOW.call }],
|
222
316
|
##
|
223
317
|
# Overflow Y
|
224
318
|
# @see https://tailwindcss.com/docs/overflow
|
225
319
|
##
|
226
|
-
"overflow-y" => [{ "overflow-y" =>
|
320
|
+
"overflow-y" => [{ "overflow-y" => SCALE_OVERSCROLL.call }],
|
227
321
|
##
|
228
322
|
# Overscroll Behavior
|
229
323
|
# @see https://tailwindcss.com/docs/overscroll-behavior
|
230
324
|
##
|
231
|
-
"overscroll" => [{ "overscroll" =>
|
325
|
+
"overscroll" => [{ "overscroll" => SCALE_OVERSCROLL.call }],
|
232
326
|
##
|
233
327
|
# Overscroll Behavior X
|
234
328
|
# @see https://tailwindcss.com/docs/overscroll-behavior
|
235
329
|
##
|
236
|
-
"overscroll-x" => [{ "overscroll-x" =>
|
330
|
+
"overscroll-x" => [{ "overscroll-x" => SCALE_OVERSCROLL.call }],
|
237
331
|
##
|
238
332
|
# Overscroll Behavior Y
|
239
333
|
# @see https://tailwindcss.com/docs/overscroll-behavior
|
240
334
|
##
|
241
|
-
"overscroll-y" => [{ "overscroll-y" =>
|
335
|
+
"overscroll-y" => [{ "overscroll-y" => SCALE_OVERSCROLL.call }],
|
242
336
|
##
|
243
337
|
# Position
|
244
338
|
# @see https://tailwindcss.com/docs/position
|
@@ -248,47 +342,47 @@ module TailwindMerge
|
|
248
342
|
# Top / Right / Bottom / Left
|
249
343
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
250
344
|
##
|
251
|
-
"inset" => [{ "inset" => [
|
345
|
+
"inset" => [{ "inset" => [SCALE_INSET] }],
|
252
346
|
##
|
253
347
|
# Right / Left
|
254
348
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
255
349
|
##
|
256
|
-
"inset-x" => [{ "inset-x" => [
|
350
|
+
"inset-x" => [{ "inset-x" => [SCALE_INSET] }],
|
257
351
|
##
|
258
352
|
# Top / Bottom
|
259
353
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
260
354
|
##
|
261
|
-
"inset-y" => [{ "inset-y" => [
|
355
|
+
"inset-y" => [{ "inset-y" => [SCALE_INSET] }],
|
262
356
|
#
|
263
357
|
# Start
|
264
358
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
265
359
|
#
|
266
|
-
"start" => [{ "start" => [
|
360
|
+
"start" => [{ "start" => [SCALE_INSET] }],
|
267
361
|
#
|
268
362
|
# End
|
269
363
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
270
364
|
#
|
271
|
-
"end" => [{ "end" => [
|
365
|
+
"end" => [{ "end" => [SCALE_INSET] }],
|
272
366
|
##
|
273
367
|
# Top
|
274
368
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
275
369
|
##
|
276
|
-
"top" => [{ "top" => [
|
370
|
+
"top" => [{ "top" => [SCALE_INSET] }],
|
277
371
|
##
|
278
372
|
# Right
|
279
373
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
280
374
|
##
|
281
|
-
"right" => [{ "right" => [
|
375
|
+
"right" => [{ "right" => [SCALE_INSET] }],
|
282
376
|
##
|
283
377
|
# Bottom
|
284
378
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
285
379
|
##
|
286
|
-
"bottom" => [{ "bottom" => [
|
380
|
+
"bottom" => [{ "bottom" => [SCALE_INSET] }],
|
287
381
|
##
|
288
382
|
# Left
|
289
383
|
# @see https://tailwindcss.com/docs/top-right-bottom-left
|
290
384
|
##
|
291
|
-
"left" => [{ "left" => [
|
385
|
+
"left" => [{ "left" => [SCALE_INSET] }],
|
292
386
|
##
|
293
387
|
# Visibility
|
294
388
|
# @see https://tailwindcss.com/docs/visibility
|
@@ -298,13 +392,24 @@ module TailwindMerge
|
|
298
392
|
# Z-Index
|
299
393
|
# @see https://tailwindcss.com/docs/z-index
|
300
394
|
##
|
301
|
-
"z" => [{ "z" => ["auto",
|
395
|
+
"z" => [{ "z" => [IS_INTEGER, "auto", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
396
|
+
|
397
|
+
##########
|
302
398
|
# Flexbox and Grid
|
303
|
-
|
399
|
+
##########
|
400
|
+
|
304
401
|
# Flex Basis
|
305
402
|
# @see https://tailwindcss.com/docs/flex-basis
|
306
403
|
##
|
307
|
-
"basis" => [{
|
404
|
+
"basis" => [{
|
405
|
+
"basis" => [
|
406
|
+
IS_FRACTION,
|
407
|
+
"full",
|
408
|
+
"auto",
|
409
|
+
THEME_CONTAINER,
|
410
|
+
*SCALE_UNAMBIGUOUS_SPACING.call,
|
411
|
+
],
|
412
|
+
}],
|
308
413
|
##
|
309
414
|
# Flex Direction
|
310
415
|
# @see https://tailwindcss.com/docs/flex-direction
|
@@ -314,68 +419,77 @@ module TailwindMerge
|
|
314
419
|
# Flex Wrap
|
315
420
|
# @see https://tailwindcss.com/docs/flex-wrap
|
316
421
|
##
|
317
|
-
"flex-wrap" => [{ "flex" => ["
|
422
|
+
"flex-wrap" => [{ "flex" => ["nowrap", "wrap", "wrap-reverse"] }],
|
318
423
|
##
|
319
424
|
# Flex
|
320
425
|
# @see https://tailwindcss.com/docs/flex
|
321
426
|
##
|
322
|
-
"flex" => [{ "flex" => [
|
427
|
+
"flex" => [{ "flex" => [IS_NUMBER, IS_FRACTION, "auto", "initial", "none", Validators::IS_ARBITRARY_VALUE] }],
|
323
428
|
##
|
324
429
|
# Flex Grow
|
325
430
|
# @see https://tailwindcss.com/docs/flex-grow
|
326
431
|
##
|
327
|
-
"grow" => [{ "grow" =>
|
432
|
+
"grow" => [{ "grow" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
328
433
|
##
|
329
434
|
# Flex Shrink
|
330
435
|
# @see https://tailwindcss.com/docs/flex-shrink
|
331
436
|
##
|
332
|
-
"shrink" => [{ "shrink" =>
|
437
|
+
"shrink" => [{ "shrink" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
333
438
|
##
|
334
439
|
# Order
|
335
440
|
# @see https://tailwindcss.com/docs/order
|
336
441
|
##
|
337
|
-
"order" => [{
|
442
|
+
"order" => [{
|
443
|
+
"order" => [
|
444
|
+
IS_INTEGER,
|
445
|
+
"first",
|
446
|
+
"last",
|
447
|
+
"none",
|
448
|
+
IS_ARBITRARY_VARIABLE,
|
449
|
+
IS_ARBITRARY_VALUE,
|
450
|
+
],
|
451
|
+
}],
|
338
452
|
##
|
339
453
|
# Grid Template Columns
|
340
454
|
# @see https://tailwindcss.com/docs/grid-template-columns
|
341
455
|
##
|
342
|
-
"grid-cols" => [{ "grid-cols" =>
|
456
|
+
"grid-cols" => [{ "grid-cols" => SCALE_GRID_TEMPLATE_COLS_ROWS.call }],
|
343
457
|
##
|
344
458
|
# Grid Column Start / End
|
345
459
|
# @see https://tailwindcss.com/docs/grid-column
|
346
460
|
##
|
347
|
-
"col-start-end" => [{ "col" =>
|
461
|
+
"col-start-end" => [{ "col" => SCALE_GRID_COL_ROW_START_AND_END.call }],
|
348
462
|
|
349
463
|
##
|
350
464
|
# Grid Column Start
|
351
465
|
# @see https://tailwindcss.com/docs/grid-column
|
352
466
|
##
|
353
|
-
"col-start" => [{ "col-start" =>
|
467
|
+
"col-start" => [{ "col-start" => SCALE_GRID_COL_ROW_START_OR_END.call }],
|
354
468
|
##
|
355
469
|
# Grid Column End
|
356
470
|
# @see https://tailwindcss.com/docs/grid-column
|
357
471
|
##
|
358
|
-
"col-end" => [{ "col-end" =>
|
472
|
+
"col-end" => [{ "col-end" => SCALE_GRID_COL_ROW_START_OR_END.call }],
|
359
473
|
##
|
360
474
|
# Grid Template Rows
|
361
475
|
# @see https://tailwindcss.com/docs/grid-template-rows
|
362
476
|
##
|
363
|
-
"grid-rows" => [{ "grid-rows" =>
|
477
|
+
"grid-rows" => [{ "grid-rows" => SCALE_GRID_TEMPLATE_COLS_ROWS.call }],
|
364
478
|
##
|
365
479
|
# Grid Row Start / End
|
366
480
|
# @see https://tailwindcss.com/docs/grid-row
|
367
481
|
##
|
368
|
-
"row-start-end" => [{ "row" =>
|
482
|
+
"row-start-end" => [{ "row" => SCALE_GRID_COL_ROW_START_AND_END.call }],
|
369
483
|
##
|
370
484
|
# Grid Row Start
|
371
485
|
# @see https://tailwindcss.com/docs/grid-row
|
372
486
|
##
|
373
|
-
"row-start" => [{ "row-start" =>
|
487
|
+
"row-start" => [{ "row-start" => SCALE_GRID_COL_ROW_START_OR_END.call }],
|
374
488
|
##
|
375
489
|
# Grid Row End
|
376
490
|
# @see https://tailwindcss.com/docs/grid-row
|
377
491
|
##
|
378
|
-
"row-end" => [{ "row-end" =>
|
492
|
+
"row-end" => [{ "row-end" => SCALE_GRID_COL_ROW_START_OR_END.call }],
|
379
493
|
##
|
380
494
|
# Grid Auto Flow
|
381
495
|
# @see https://tailwindcss.com/docs/grid-auto-flow
|
@@ -385,206 +499,214 @@ module TailwindMerge
|
|
385
499
|
# Grid Auto Columns
|
386
500
|
# @see https://tailwindcss.com/docs/grid-auto-columns
|
387
501
|
##
|
388
|
-
"auto-cols" => [{ "auto-cols" =>
|
502
|
+
"auto-cols" => [{ "auto-cols" => SCALE_GRID_AUTO_COLS_ROWS.call }],
|
389
503
|
##
|
390
504
|
# Grid Auto Rows
|
391
505
|
# @see https://tailwindcss.com/docs/grid-auto-rows
|
392
506
|
##
|
393
|
-
"auto-rows" => [{ "auto-rows" =>
|
507
|
+
"auto-rows" => [{ "auto-rows" => SCALE_GRID_AUTO_COLS_ROWS.call }],
|
394
508
|
##
|
395
509
|
# Gap
|
396
510
|
# @see https://tailwindcss.com/docs/gap
|
397
511
|
##
|
398
|
-
"gap" => [{ "gap" =>
|
512
|
+
"gap" => [{ "gap" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
399
513
|
##
|
400
514
|
# Gap X
|
401
515
|
# @see https://tailwindcss.com/docs/gap
|
402
516
|
##
|
403
|
-
"gap-x" => [{ "gap-x" =>
|
517
|
+
"gap-x" => [{ "gap-x" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
404
518
|
##
|
405
519
|
# Gap Y
|
406
520
|
# @see https://tailwindcss.com/docs/gap
|
407
521
|
##
|
408
|
-
"gap-y" => [{ "gap-y" =>
|
522
|
+
"gap-y" => [{ "gap-y" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
409
523
|
##
|
410
524
|
# Justify Content
|
411
525
|
# @see https://tailwindcss.com/docs/justify-content
|
412
526
|
##
|
413
|
-
"justify-content" => [{ "justify" => ["normal"
|
527
|
+
"justify-content" => [{ "justify" => [*SCALE_ALIGN_PRIMARY_AXIS.call, "normal"] }],
|
414
528
|
##
|
415
529
|
# Justify Items
|
416
530
|
# @see https://tailwindcss.com/docs/justify-items
|
417
531
|
##
|
418
|
-
"justify-items" => [{ "justify-items" => [
|
532
|
+
"justify-items" => [{ "justify-items" => [*SCALE_ALIGN_SECONDARY_AXIS.call, "normal"] }],
|
419
533
|
##
|
420
534
|
# Justify Self
|
421
535
|
# @see https://tailwindcss.com/docs/justify-self
|
422
536
|
##
|
423
|
-
"justify-self" => [{ "justify-self" => ["auto",
|
537
|
+
"justify-self" => [{ "justify-self" => ["auto", *SCALE_ALIGN_SECONDARY_AXIS.call] }],
|
424
538
|
##
|
425
539
|
# Align Content
|
426
540
|
# @see https://tailwindcss.com/docs/align-content
|
427
541
|
##
|
428
|
-
"align-content" => [{ "content" => ["normal", *
|
542
|
+
"align-content" => [{ "content" => ["normal", *SCALE_ALIGN_PRIMARY_AXIS.call] }],
|
429
543
|
##
|
430
544
|
# Align Items
|
431
545
|
# @see https://tailwindcss.com/docs/align-items
|
432
546
|
##
|
433
|
-
"align-items" => [{ "items" => [
|
547
|
+
"align-items" => [{ "items" => [*SCALE_ALIGN_SECONDARY_AXIS.call, "baseline"] }],
|
434
548
|
##
|
435
549
|
# Align Self
|
436
550
|
# @see https://tailwindcss.com/docs/align-self
|
437
551
|
##
|
438
|
-
"align-self" => [{ "self" => ["auto",
|
552
|
+
"align-self" => [{ "self" => ["auto", *SCALE_ALIGN_SECONDARY_AXIS.call, "baseline"] }],
|
439
553
|
##
|
440
554
|
# Place Content
|
441
555
|
# @see https://tailwindcss.com/docs/place-content
|
442
556
|
##
|
443
|
-
"place-content" => [{ "place-content" =>
|
557
|
+
"place-content" => [{ "place-content" => SCALE_ALIGN_PRIMARY_AXIS.call }],
|
444
558
|
##
|
445
559
|
# Place Items
|
446
560
|
# @see https://tailwindcss.com/docs/place-items
|
447
561
|
##
|
448
|
-
"place-items" => [{ "place-items" => [
|
562
|
+
"place-items" => [{ "place-items" => [*SCALE_ALIGN_SECONDARY_AXIS.call, "baseline"] }],
|
449
563
|
##
|
450
564
|
# Place Self
|
451
565
|
# @see https://tailwindcss.com/docs/place-self
|
452
566
|
##
|
453
|
-
"place-self" => [{ "place-self" => ["auto",
|
567
|
+
"place-self" => [{ "place-self" => ["auto", *SCALE_ALIGN_SECONDARY_AXIS.call] }],
|
454
568
|
# Spacing
|
455
569
|
##
|
456
570
|
# Padding
|
457
571
|
# @see https://tailwindcss.com/docs/padding
|
458
572
|
##
|
459
|
-
"p" => [{ "p" =>
|
573
|
+
"p" => [{ "p" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
460
574
|
##
|
461
575
|
# Padding X
|
462
576
|
# @see https://tailwindcss.com/docs/padding
|
463
577
|
##
|
464
|
-
"px" => [{ "px" =>
|
578
|
+
"px" => [{ "px" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
465
579
|
##
|
466
580
|
# Padding Y
|
467
581
|
# @see https://tailwindcss.com/docs/padding
|
468
582
|
##
|
469
|
-
"py" => [{ "py" =>
|
583
|
+
"py" => [{ "py" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
470
584
|
#
|
471
585
|
# Padding Start
|
472
586
|
# @see https://tailwindcss.com/docs/padding
|
473
587
|
#
|
474
|
-
"ps" => [{ "ps" =>
|
588
|
+
"ps" => [{ "ps" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
475
589
|
#
|
476
590
|
# Padding End
|
477
591
|
# @see https://tailwindcss.com/docs/padding
|
478
592
|
#
|
479
|
-
"pe" => [{ "pe" =>
|
593
|
+
"pe" => [{ "pe" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
480
594
|
##
|
481
595
|
# Padding Top
|
482
596
|
# @see https://tailwindcss.com/docs/padding
|
483
597
|
##
|
484
|
-
"pt" => [{ "pt" =>
|
598
|
+
"pt" => [{ "pt" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
485
599
|
##
|
486
600
|
# Padding Right
|
487
601
|
# @see https://tailwindcss.com/docs/padding
|
488
602
|
##
|
489
|
-
"pr" => [{ "pr" =>
|
603
|
+
"pr" => [{ "pr" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
490
604
|
##
|
491
605
|
# Padding Bottom
|
492
606
|
# @see https://tailwindcss.com/docs/padding
|
493
607
|
##
|
494
|
-
"pb" => [{ "pb" =>
|
608
|
+
"pb" => [{ "pb" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
495
609
|
##
|
496
610
|
# Padding Left
|
497
611
|
# @see https://tailwindcss.com/docs/padding
|
498
612
|
##
|
499
|
-
"pl" => [{ "pl" =>
|
613
|
+
"pl" => [{ "pl" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
500
614
|
##
|
501
615
|
# Margin
|
502
616
|
# @see https://tailwindcss.com/docs/margin
|
503
617
|
##
|
504
|
-
"m" => [{ "m" =>
|
618
|
+
"m" => [{ "m" => SCALE_MARGIN.call }],
|
505
619
|
##
|
506
620
|
# Margin X
|
507
621
|
# @see https://tailwindcss.com/docs/margin
|
508
622
|
##
|
509
|
-
"mx" => [{ "mx" =>
|
623
|
+
"mx" => [{ "mx" => SCALE_MARGIN.call }],
|
510
624
|
##
|
511
625
|
# Margin Y
|
512
626
|
# @see https://tailwindcss.com/docs/margin
|
513
627
|
##
|
514
|
-
"my" => [{ "my" =>
|
628
|
+
"my" => [{ "my" => SCALE_MARGIN.call }],
|
515
629
|
#
|
516
630
|
# Margin Start
|
517
631
|
# @see https://tailwindcss.com/docs/margin
|
518
632
|
#
|
519
|
-
"ms" => [{ "ms" =>
|
633
|
+
"ms" => [{ "ms" => SCALE_MARGIN.call }],
|
520
634
|
#
|
521
635
|
# Margin End
|
522
636
|
# @see https://tailwindcss.com/docs/margin
|
523
637
|
#
|
524
|
-
"me" => [{ "me" =>
|
638
|
+
"me" => [{ "me" => SCALE_MARGIN.call }],
|
525
639
|
##
|
526
640
|
# Margin Top
|
527
641
|
# @see https://tailwindcss.com/docs/margin
|
528
642
|
##
|
529
|
-
"mt" => [{ "mt" =>
|
643
|
+
"mt" => [{ "mt" => SCALE_MARGIN.call }],
|
530
644
|
##
|
531
645
|
# Margin Right
|
532
646
|
# @see https://tailwindcss.com/docs/margin
|
533
647
|
##
|
534
|
-
"mr" => [{ "mr" =>
|
648
|
+
"mr" => [{ "mr" => SCALE_MARGIN.call }],
|
535
649
|
##
|
536
650
|
# Margin Bottom
|
537
651
|
# @see https://tailwindcss.com/docs/margin
|
538
652
|
##
|
539
|
-
"mb" => [{ "mb" =>
|
653
|
+
"mb" => [{ "mb" => SCALE_MARGIN.call }],
|
540
654
|
##
|
541
655
|
# Margin Left
|
542
656
|
# @see https://tailwindcss.com/docs/margin
|
543
657
|
##
|
544
|
-
"ml" => [{ "ml" =>
|
658
|
+
"ml" => [{ "ml" => SCALE_MARGIN.call }],
|
545
659
|
##
|
546
660
|
# Space Between X
|
547
|
-
# @see https://tailwindcss.com/docs/space
|
661
|
+
# @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
548
662
|
##
|
549
|
-
"space-x" => [{ "space-x" =>
|
663
|
+
"space-x" => [{ "space-x" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
550
664
|
##
|
551
665
|
# Space Between X Reverse
|
552
|
-
# @see https://tailwindcss.com/docs/space
|
666
|
+
# @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
553
667
|
##
|
554
668
|
"space-x-reverse" => ["space-x-reverse"],
|
555
669
|
##
|
556
670
|
# Space Between Y
|
557
|
-
# @see https://tailwindcss.com/docs/space
|
671
|
+
# @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
558
672
|
##
|
559
|
-
"space-y" => [{ "space-y" =>
|
673
|
+
"space-y" => [{ "space-y" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
560
674
|
##
|
561
675
|
# Space Between Y Reverse
|
562
|
-
# @see https://tailwindcss.com/docs/space
|
676
|
+
# @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
563
677
|
##
|
564
678
|
"space-y-reverse" => ["space-y-reverse"],
|
679
|
+
|
680
|
+
##########
|
565
681
|
# Sizing
|
682
|
+
##########
|
683
|
+
|
684
|
+
##
|
685
|
+
# Size
|
686
|
+
# @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
566
687
|
##
|
688
|
+
"size" => [{ "size" => SCALE_SIZING.call }],
|
567
689
|
# Width
|
568
690
|
# @see https://tailwindcss.com/docs/width
|
569
691
|
##
|
570
692
|
"w" => [{
|
571
693
|
"w" => [
|
572
|
-
"
|
573
|
-
"min",
|
574
|
-
"max",
|
575
|
-
"fit",
|
576
|
-
"svw",
|
577
|
-
"lvw",
|
578
|
-
"dvw",
|
579
|
-
IS_ARBITRARY_VALUE,
|
580
|
-
SPACING,
|
694
|
+
THEME_CONTAINER, "screen", *SCALE_SIZING.call,
|
581
695
|
],
|
582
696
|
}],
|
583
697
|
##
|
584
698
|
# Min-Width
|
585
699
|
# @see https://tailwindcss.com/docs/min-width
|
586
700
|
##
|
587
|
-
"min-w" => [{
|
701
|
+
"min-w" => [{
|
702
|
+
"min-w" => [
|
703
|
+
THEME_CONTAINER,
|
704
|
+
"screen",
|
705
|
+
# Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
706
|
+
"none",
|
707
|
+
*SCALE_SIZING.call,
|
708
|
+
],
|
709
|
+
}],
|
588
710
|
##
|
589
711
|
# Max-Width
|
590
712
|
# @see https://tailwindcss.com/docs/max-width
|
@@ -592,16 +714,14 @@ module TailwindMerge
|
|
592
714
|
"max-w" => [
|
593
715
|
{
|
594
716
|
"max-w" => [
|
595
|
-
|
596
|
-
|
717
|
+
THEME_CONTAINER,
|
718
|
+
"screen",
|
597
719
|
"none",
|
598
|
-
|
599
|
-
"min",
|
600
|
-
"max",
|
601
|
-
"fit",
|
720
|
+
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
602
721
|
"prose",
|
603
|
-
|
604
|
-
|
722
|
+
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
723
|
+
{ "screen" => [THEME_BREAKPOINT] },
|
724
|
+
*SCALE_SIZING.call,
|
605
725
|
],
|
606
726
|
},
|
607
727
|
],
|
@@ -609,28 +729,26 @@ module TailwindMerge
|
|
609
729
|
# Height
|
610
730
|
# @see https://tailwindcss.com/docs/height
|
611
731
|
##
|
612
|
-
"h" => [{ "h" => [
|
732
|
+
"h" => [{ "h" => ["screen", *SCALE_SIZING.call] }],
|
613
733
|
##
|
614
734
|
# Min-Height
|
615
735
|
# @see https://tailwindcss.com/docs/min-height
|
616
736
|
##
|
617
|
-
"min-h" => [{ "min-h" => [
|
737
|
+
"min-h" => [{ "min-h" => ["screen", "none", *SCALE_SIZING.call] }],
|
618
738
|
##
|
619
739
|
# Max-Height
|
620
740
|
# @see https://tailwindcss.com/docs/max-height
|
621
741
|
##
|
622
|
-
"max-h" => [{ "max-h" => [
|
623
|
-
|
624
|
-
|
625
|
-
# @see https://tailwindcss.com/docs/size
|
626
|
-
##
|
627
|
-
"size" => [{ "size" => [IS_ARBITRARY_VALUE, SPACING, "auto", "min", "max", "fit"] }],
|
742
|
+
"max-h" => [{ "max-h" => ["screen", *SCALE_SIZING.call] }],
|
743
|
+
|
744
|
+
############
|
628
745
|
# Typography
|
629
|
-
|
746
|
+
############
|
747
|
+
|
630
748
|
# Font Size
|
631
749
|
# @see https://tailwindcss.com/docs/font-size
|
632
750
|
##
|
633
|
-
"font-size" => [{ "text" => ["base",
|
751
|
+
"font-size" => [{ "text" => ["base", THEME_TEXT, IS_ARBITRARY_VARIABLE_LENGTH, IS_ARBITRARY_LENGTH] }],
|
634
752
|
##
|
635
753
|
# Font Smoothing
|
636
754
|
# @see https://tailwindcss.com/docs/font-smoothing
|
@@ -648,24 +766,38 @@ module TailwindMerge
|
|
648
766
|
"font-weight" => [
|
649
767
|
{
|
650
768
|
"font" => [
|
651
|
-
|
652
|
-
|
653
|
-
"light",
|
654
|
-
"normal",
|
655
|
-
"medium",
|
656
|
-
"semibold",
|
657
|
-
"bold",
|
658
|
-
"extrabold",
|
659
|
-
"black",
|
769
|
+
THEME_FONT_WEIGHT,
|
770
|
+
IS_ARBITRARY_VARIABLE,
|
660
771
|
IS_ARBITRARY_NUMBER,
|
661
772
|
],
|
662
773
|
},
|
663
774
|
],
|
664
775
|
##
|
776
|
+
# Font Stretch
|
777
|
+
# @see https://tailwindcss.com/docs/font-stretch
|
778
|
+
##
|
779
|
+
"font-stretch" => [
|
780
|
+
{
|
781
|
+
"font-stretch" => [
|
782
|
+
"ultra-condensed",
|
783
|
+
"extra-condensed",
|
784
|
+
"condensed",
|
785
|
+
"semi-condensed",
|
786
|
+
"normal",
|
787
|
+
"semi-expanded",
|
788
|
+
"expanded",
|
789
|
+
"extra-expanded",
|
790
|
+
"ultra-expanded",
|
791
|
+
IS_PERCENT,
|
792
|
+
IS_ARBITRARY_VALUE,
|
793
|
+
],
|
794
|
+
},
|
795
|
+
],
|
796
|
+
##
|
665
797
|
# Font Family
|
666
798
|
# @see https://tailwindcss.com/docs/font-family
|
667
799
|
##
|
668
|
-
"font-family" => [{ "font" => [
|
800
|
+
"font-family" => [{ "font" => [IS_ARBITRARY_VARIABLE_FAMILY_NAME, IS_ARBITRARY_VALUE, THEME_FONT] }],
|
669
801
|
##
|
670
802
|
# Font Variant Numeric
|
671
803
|
# @see https://tailwindcss.com/docs/font-variant-numeric
|
@@ -702,70 +834,57 @@ module TailwindMerge
|
|
702
834
|
##
|
703
835
|
"tracking" => [
|
704
836
|
{
|
705
|
-
"tracking" => [
|
706
|
-
|
707
|
-
"tight",
|
708
|
-
"normal",
|
709
|
-
"wide",
|
710
|
-
"wider",
|
711
|
-
"widest",
|
712
|
-
IS_ARBITRARY_VALUE,
|
713
|
-
],
|
714
|
-
}, # rubocop:enable Metrics/CollectionLiteralLength
|
837
|
+
"tracking" => [THEME_TRACKING, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE],
|
838
|
+
},
|
715
839
|
],
|
716
840
|
#
|
717
841
|
# Line Clamp
|
718
842
|
# @see https://tailwindcss.com/docs/line-clamp
|
719
843
|
#
|
720
|
-
"line-clamp" => [{ "line-clamp" => ["none",
|
844
|
+
"line-clamp" => [{ "line-clamp" => [IS_NUMBER, "none", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_NUMBER] }],
|
721
845
|
##
|
722
846
|
# Line Height
|
723
847
|
# @see https://tailwindcss.com/docs/line-height
|
724
848
|
##
|
725
849
|
"leading" => [
|
726
|
-
{
|
850
|
+
{
|
851
|
+
"leading" => [
|
852
|
+
# Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
853
|
+
THEME_LEADING,
|
854
|
+
*SCALE_UNAMBIGUOUS_SPACING.call,
|
855
|
+
],
|
856
|
+
},
|
727
857
|
],
|
728
858
|
#
|
729
859
|
# List Style Image
|
730
860
|
# @see https://tailwindcss.com/docs/list-style-image
|
731
861
|
#
|
732
|
-
"list-image" => [{ "list-image" => ["none", IS_ARBITRARY_VALUE] }],
|
733
|
-
##
|
734
|
-
# List Style Type
|
735
|
-
# @see https://tailwindcss.com/docs/list-style-type
|
736
|
-
##
|
737
|
-
"list-style-type" => [{ "list" => ["none", "disc", "decimal", IS_ARBITRARY_VALUE] }],
|
738
|
-
##
|
862
|
+
"list-image" => [{ "list-image" => ["none", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
739
863
|
# List Style Position
|
740
864
|
# @see https://tailwindcss.com/docs/list-style-position
|
741
865
|
##
|
742
866
|
"list-style-position" => [{ "list" => ["inside", "outside"] }],
|
743
867
|
##
|
744
|
-
#
|
745
|
-
# @
|
746
|
-
# @see https://tailwindcss.com/docs/placeholder-color
|
747
|
-
##
|
748
|
-
"placeholder-color" => [{ "placeholder" => [COLORS] }],
|
749
|
-
##
|
750
|
-
# Placeholder Opacity
|
751
|
-
# @see https://tailwindcss.com/docs/placeholder-opacity
|
868
|
+
# List Style Type
|
869
|
+
# @see https://tailwindcss.com/docs/list-style-type
|
752
870
|
##
|
753
|
-
"
|
871
|
+
"list-style-type" => [{ "list" => ["disc", "decimal", "none", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
754
872
|
##
|
755
873
|
# Text Alignment
|
756
874
|
# @see https://tailwindcss.com/docs/text-align
|
757
875
|
##
|
758
876
|
"text-alignment" => [{ "text" => ["left", "center", "right", "justify", "start", "end"] }],
|
759
877
|
##
|
760
|
-
#
|
761
|
-
# @
|
878
|
+
# Placeholder Color
|
879
|
+
# @deprecated since Tailwind CSS v3.0.0
|
880
|
+
# @see https://tailwindcss.com/docs/placeholder-color
|
762
881
|
##
|
763
|
-
"
|
882
|
+
"placeholder-color" => [{ "placeholder" => SCALE_COLOR.call }],
|
764
883
|
##
|
765
|
-
# Text
|
766
|
-
# @see https://tailwindcss.com/docs/text-
|
884
|
+
# Text Color
|
885
|
+
# @see https://tailwindcss.com/docs/text-color
|
767
886
|
##
|
768
|
-
"text-
|
887
|
+
"text-color" => [{ "text" => SCALE_COLOR.call }],
|
769
888
|
##
|
770
889
|
# Text Decoration
|
771
890
|
# @see https://tailwindcss.com/docs/text-decoration
|
@@ -775,22 +894,22 @@ module TailwindMerge
|
|
775
894
|
# Text Decoration Style
|
776
895
|
# @see https://tailwindcss.com/docs/text-decoration-style
|
777
896
|
##
|
778
|
-
"text-decoration-style" => [{ "decoration" => [*
|
897
|
+
"text-decoration-style" => [{ "decoration" => [*SCALE_LINE_STYLE.call, "wavy"] }],
|
779
898
|
##
|
780
899
|
# Text Decoration Thickness
|
781
900
|
# @see https://tailwindcss.com/docs/text-decoration-thickness
|
782
901
|
##
|
783
|
-
"text-decoration-thickness" => [{ "decoration" => [
|
784
|
-
##
|
785
|
-
# Text Underline Offset
|
786
|
-
# @see https://tailwindcss.com/docs/text-underline-offset
|
787
|
-
##
|
788
|
-
"underline-offset" => [{ "underline-offset" => ["auto", IS_LENGTH, IS_ARBITRARY_VALUE] }],
|
902
|
+
"text-decoration-thickness" => [{ "decoration" => [IS_NUMBER, "from-font", "auto", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_LENGTH] }],
|
789
903
|
##
|
790
904
|
# Text Decoration Color
|
791
905
|
# @see https://tailwindcss.com/docs/text-decoration-color
|
792
906
|
##
|
793
|
-
"text-decoration-color" => [{ "decoration" =>
|
907
|
+
"text-decoration-color" => [{ "decoration" => SCALE_COLOR.call }],
|
908
|
+
##
|
909
|
+
# Text Underline Offset
|
910
|
+
# @see https://tailwindcss.com/docs/text-underline-offset
|
911
|
+
##
|
912
|
+
"underline-offset" => [{ "underline-offset" => [IS_NUMBER, "auto", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
794
913
|
##
|
795
914
|
# Text Transform
|
796
915
|
# @see https://tailwindcss.com/docs/text-transform
|
@@ -810,7 +929,7 @@ module TailwindMerge
|
|
810
929
|
# Text Indent
|
811
930
|
# @see https://tailwindcss.com/docs/text-indent
|
812
931
|
##
|
813
|
-
"indent" => [{ "indent" =>
|
932
|
+
"indent" => [{ "indent" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
814
933
|
##
|
815
934
|
# Vertical Alignment
|
816
935
|
# @see https://tailwindcss.com/docs/vertical-align
|
@@ -826,6 +945,7 @@ module TailwindMerge
|
|
826
945
|
"text-bottom",
|
827
946
|
"sub",
|
828
947
|
"super",
|
948
|
+
IS_ARBITRARY_VARIABLE,
|
829
949
|
IS_ARBITRARY_VALUE,
|
830
950
|
],
|
831
951
|
},
|
@@ -849,9 +969,12 @@ module TailwindMerge
|
|
849
969
|
# Content
|
850
970
|
# @see https://tailwindcss.com/docs/content
|
851
971
|
##
|
852
|
-
"content" => [{ "content" => ["none", IS_ARBITRARY_VALUE] }],
|
972
|
+
"content" => [{ "content" => ["none", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
973
|
+
|
974
|
+
#############
|
853
975
|
# Backgrounds
|
854
|
-
|
976
|
+
#############
|
977
|
+
|
855
978
|
# Background Attachment
|
856
979
|
# @see https://tailwindcss.com/docs/background-attachment
|
857
980
|
##
|
@@ -862,12 +985,6 @@ module TailwindMerge
|
|
862
985
|
##
|
863
986
|
"bg-clip" => [{ "bg-clip" => ["border", "padding", "content", "text"] }],
|
864
987
|
##
|
865
|
-
# Background Opacity
|
866
|
-
# @deprecated since Tailwind CSS v3.0.0
|
867
|
-
# @see https://tailwindcss.com/docs/background-opacity
|
868
|
-
##
|
869
|
-
"bg-opacity" => [{ "bg-opacity" => [OPACITY] }],
|
870
|
-
##
|
871
988
|
# Background Origin
|
872
989
|
# @see https://tailwindcss.com/docs/background-origin
|
873
990
|
##
|
@@ -876,17 +993,17 @@ module TailwindMerge
|
|
876
993
|
# Background Position
|
877
994
|
# @see https://tailwindcss.com/docs/background-position
|
878
995
|
##
|
879
|
-
"bg-position" => [{ "bg" => [*
|
996
|
+
"bg-position" => [{ "bg" => [*SCALE_POSITION.call, IS_ARBITRARY_VARIABLE_POSITION, IS_ARBITRARY_POSITION] }],
|
880
997
|
##
|
881
998
|
# Background Repeat
|
882
999
|
# @see https://tailwindcss.com/docs/background-repeat
|
883
1000
|
##
|
884
|
-
"bg-repeat" => [{ "bg" => ["no-repeat", { "repeat" => ["", "x", "y", "
|
1001
|
+
"bg-repeat" => [{ "bg" => ["no-repeat", { "repeat" => ["", "x", "y", "space", "round"] }] }],
|
885
1002
|
##
|
886
1003
|
# Background Size
|
887
1004
|
# @see https://tailwindcss.com/docs/background-size
|
888
1005
|
##
|
889
|
-
"bg-size" => [{ "bg" => ["auto", "cover", "contain", IS_ARBITRARY_SIZE] }],
|
1006
|
+
"bg-size" => [{ "bg" => ["auto", "cover", "contain", IS_ARBITRARY_VARIABLE_SIZE, IS_ARBITRARY_SIZE] }],
|
890
1007
|
##
|
891
1008
|
# Background Image
|
892
1009
|
# @see https://tailwindcss.com/docs/background-image
|
@@ -895,7 +1012,17 @@ module TailwindMerge
|
|
895
1012
|
{
|
896
1013
|
"bg" => [
|
897
1014
|
"none",
|
898
|
-
{
|
1015
|
+
{
|
1016
|
+
"linear" => [
|
1017
|
+
{ "to" => ["t", "tr", "r", "br", "b", "bl", "l", "tl"] },
|
1018
|
+
IS_INTEGER,
|
1019
|
+
IS_ARBITRARY_VARIABLE,
|
1020
|
+
IS_ARBITRARY_VALUE,
|
1021
|
+
],
|
1022
|
+
"radial" => ["", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE],
|
1023
|
+
"conic" => [IS_INTEGER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE],
|
1024
|
+
},
|
1025
|
+
IS_ARBITRARY_VARIABLE_IMAGE,
|
899
1026
|
IS_ARBITRARY_IMAGE,
|
900
1027
|
],
|
901
1028
|
},
|
@@ -904,173 +1031,167 @@ module TailwindMerge
|
|
904
1031
|
# Background Color
|
905
1032
|
# @see https://tailwindcss.com/docs/background-color
|
906
1033
|
##
|
907
|
-
"bg-color" => [{ "bg" =>
|
1034
|
+
"bg-color" => [{ "bg" => SCALE_COLOR.call }],
|
908
1035
|
#
|
909
1036
|
# Gradient Color Stops From Position
|
910
1037
|
# @see https://tailwindcss.com/docs/gradient-color-stops
|
911
1038
|
#
|
912
|
-
"gradient-from-pos" => [{ "from" =>
|
1039
|
+
"gradient-from-pos" => [{ "from" => SCALE_GRADIENT_STOP_POSITION.call }],
|
913
1040
|
#
|
914
1041
|
# Gradient Color Stops Via Position
|
915
1042
|
# @see https://tailwindcss.com/docs/gradient-color-stops
|
916
1043
|
#
|
917
|
-
"gradient-via-pos" => [{ "via" =>
|
1044
|
+
"gradient-via-pos" => [{ "via" => SCALE_GRADIENT_STOP_POSITION.call }],
|
918
1045
|
#
|
919
1046
|
# Gradient Color Stops To Position
|
920
1047
|
# @see https://tailwindcss.com/docs/gradient-color-stops
|
921
1048
|
#
|
922
|
-
"gradient-to-pos" => [{ "to" =>
|
1049
|
+
"gradient-to-pos" => [{ "to" => SCALE_GRADIENT_STOP_POSITION.call }],
|
923
1050
|
##
|
924
1051
|
# Gradient Color Stops From
|
925
1052
|
# @see https://tailwindcss.com/docs/gradient-color-stops
|
926
1053
|
##
|
927
|
-
"gradient-from" => [{ "from" =>
|
1054
|
+
"gradient-from" => [{ "from" => SCALE_COLOR.call }],
|
928
1055
|
##
|
929
1056
|
# Gradient Color Stops Via
|
930
1057
|
# @see https://tailwindcss.com/docs/gradient-color-stops
|
931
1058
|
##
|
932
|
-
"gradient-via" => [{ "via" =>
|
1059
|
+
"gradient-via" => [{ "via" => SCALE_COLOR.call }],
|
933
1060
|
##
|
934
1061
|
# Gradient Color Stops To
|
935
1062
|
# @see https://tailwindcss.com/docs/gradient-color-stops
|
936
1063
|
##
|
937
|
-
"gradient-to" => [{ "to" =>
|
1064
|
+
"gradient-to" => [{ "to" => SCALE_COLOR.call }],
|
1065
|
+
|
1066
|
+
###########
|
938
1067
|
# Borders
|
939
|
-
|
1068
|
+
###########
|
1069
|
+
|
940
1070
|
# Border Radius
|
941
1071
|
# @see https://tailwindcss.com/docs/border-radius
|
942
1072
|
##
|
943
|
-
"rounded" => [{ "rounded" =>
|
1073
|
+
"rounded" => [{ "rounded" => SCALE_RADIUS.call }],
|
944
1074
|
#
|
945
1075
|
# Border Radius Start
|
946
1076
|
# @see https://tailwindcss.com/docs/border-radius
|
947
1077
|
#
|
948
|
-
"rounded-s" => [{ "rounded-s" =>
|
1078
|
+
"rounded-s" => [{ "rounded-s" => SCALE_RADIUS.call }],
|
949
1079
|
#
|
950
1080
|
# Border Radius End
|
951
1081
|
# @see https://tailwindcss.com/docs/border-radius
|
952
1082
|
#
|
953
|
-
"rounded-e" => [{ "rounded-e" =>
|
1083
|
+
"rounded-e" => [{ "rounded-e" => SCALE_RADIUS.call }],
|
954
1084
|
##
|
955
1085
|
# Border Radius Top
|
956
1086
|
# @see https://tailwindcss.com/docs/border-radius
|
957
1087
|
##
|
958
|
-
"rounded-t" => [{ "rounded-t" =>
|
1088
|
+
"rounded-t" => [{ "rounded-t" => SCALE_RADIUS.call }],
|
959
1089
|
##
|
960
1090
|
# Border Radius Right
|
961
1091
|
# @see https://tailwindcss.com/docs/border-radius
|
962
1092
|
##
|
963
|
-
"rounded-r" => [{ "rounded-r" =>
|
1093
|
+
"rounded-r" => [{ "rounded-r" => SCALE_RADIUS.call }],
|
964
1094
|
##
|
965
1095
|
# Border Radius Bottom
|
966
1096
|
# @see https://tailwindcss.com/docs/border-radius
|
967
1097
|
##
|
968
|
-
"rounded-b" => [{ "rounded-b" =>
|
1098
|
+
"rounded-b" => [{ "rounded-b" => SCALE_RADIUS.call }],
|
969
1099
|
##
|
970
1100
|
# Border Radius Left
|
971
1101
|
# @see https://tailwindcss.com/docs/border-radius
|
972
1102
|
##
|
973
|
-
"rounded-l" => [{ "rounded-l" =>
|
1103
|
+
"rounded-l" => [{ "rounded-l" => SCALE_RADIUS.call }],
|
974
1104
|
#
|
975
1105
|
# Border Radius Start Start
|
976
1106
|
# @see https://tailwindcss.com/docs/border-radius
|
977
1107
|
#
|
978
|
-
"rounded-ss" => [{ "rounded-ss" =>
|
1108
|
+
"rounded-ss" => [{ "rounded-ss" => SCALE_RADIUS.call }],
|
979
1109
|
#
|
980
1110
|
# Border Radius Start End
|
981
1111
|
# @see https://tailwindcss.com/docs/border-radius
|
982
1112
|
#
|
983
|
-
"rounded-se" => [{ "rounded-se" =>
|
1113
|
+
"rounded-se" => [{ "rounded-se" => SCALE_RADIUS.call }],
|
984
1114
|
#
|
985
1115
|
# Border Radius End End
|
986
1116
|
# @see https://tailwindcss.com/docs/border-radius
|
987
1117
|
#
|
988
|
-
"rounded-ee" => [{ "rounded-ee" =>
|
1118
|
+
"rounded-ee" => [{ "rounded-ee" => SCALE_RADIUS.call }],
|
989
1119
|
#
|
990
1120
|
# Border Radius End Start
|
991
1121
|
# @see https://tailwindcss.com/docs/border-radius
|
992
1122
|
#
|
993
|
-
"rounded-es" => [{ "rounded-es" =>
|
1123
|
+
"rounded-es" => [{ "rounded-es" => SCALE_RADIUS.call }],
|
994
1124
|
##
|
995
1125
|
# Border Radius Top Left
|
996
1126
|
# @see https://tailwindcss.com/docs/border-radius
|
997
1127
|
##
|
998
|
-
"rounded-tl" => [{ "rounded-tl" =>
|
1128
|
+
"rounded-tl" => [{ "rounded-tl" => SCALE_RADIUS.call }],
|
999
1129
|
##
|
1000
1130
|
# Border Radius Top Right
|
1001
1131
|
# @see https://tailwindcss.com/docs/border-radius
|
1002
1132
|
##
|
1003
|
-
"rounded-tr" => [{ "rounded-tr" =>
|
1133
|
+
"rounded-tr" => [{ "rounded-tr" => SCALE_RADIUS.call }],
|
1004
1134
|
##
|
1005
1135
|
# Border Radius Bottom Right
|
1006
1136
|
# @see https://tailwindcss.com/docs/border-radius
|
1007
1137
|
##
|
1008
|
-
"rounded-br" => [{ "rounded-br" =>
|
1138
|
+
"rounded-br" => [{ "rounded-br" => SCALE_RADIUS.call }],
|
1009
1139
|
##
|
1010
1140
|
# Border Radius Bottom Left
|
1011
1141
|
# @see https://tailwindcss.com/docs/border-radius
|
1012
1142
|
##
|
1013
|
-
"rounded-bl" => [{ "rounded-bl" =>
|
1143
|
+
"rounded-bl" => [{ "rounded-bl" => SCALE_RADIUS.call }],
|
1014
1144
|
##
|
1015
1145
|
# Border Width
|
1016
1146
|
# @see https://tailwindcss.com/docs/border-width
|
1017
1147
|
##
|
1018
|
-
"border-w" => [{ "border" =>
|
1148
|
+
"border-w" => [{ "border" => SCALE_BORDER_WIDTH.call }],
|
1019
1149
|
##
|
1020
1150
|
# Border Width X
|
1021
1151
|
# @see https://tailwindcss.com/docs/border-width
|
1022
1152
|
##
|
1023
|
-
"border-w-x" => [{ "border-x" =>
|
1153
|
+
"border-w-x" => [{ "border-x" => SCALE_BORDER_WIDTH.call }],
|
1024
1154
|
##
|
1025
1155
|
# Border Width Y
|
1026
1156
|
# @see https://tailwindcss.com/docs/border-width
|
1027
1157
|
##
|
1028
|
-
"border-w-y" => [{ "border-y" =>
|
1158
|
+
"border-w-y" => [{ "border-y" => SCALE_BORDER_WIDTH.call }],
|
1029
1159
|
#
|
1030
1160
|
# Border Width Start
|
1031
1161
|
# @see https://tailwindcss.com/docs/border-width
|
1032
1162
|
#
|
1033
|
-
"border-w-s" => [{ "border-s" =>
|
1163
|
+
"border-w-s" => [{ "border-s" => SCALE_BORDER_WIDTH.call }],
|
1034
1164
|
#
|
1035
1165
|
# Border Width End
|
1036
1166
|
# @see https://tailwindcss.com/docs/border-width
|
1037
1167
|
#
|
1038
|
-
"border-w-e" => [{ "border-e" =>
|
1168
|
+
"border-w-e" => [{ "border-e" => SCALE_BORDER_WIDTH.call }],
|
1039
1169
|
##
|
1040
1170
|
# Border Width Top
|
1041
1171
|
# @see https://tailwindcss.com/docs/border-width
|
1042
1172
|
##
|
1043
|
-
"border-w-t" => [{ "border-t" =>
|
1173
|
+
"border-w-t" => [{ "border-t" => SCALE_BORDER_WIDTH.call }],
|
1044
1174
|
##
|
1045
1175
|
# Border Width Right
|
1046
1176
|
# @see https://tailwindcss.com/docs/border-width
|
1047
1177
|
##
|
1048
|
-
"border-w-r" => [{ "border-r" =>
|
1178
|
+
"border-w-r" => [{ "border-r" => SCALE_BORDER_WIDTH.call }],
|
1049
1179
|
##
|
1050
1180
|
# Border Width Bottom
|
1051
1181
|
# @see https://tailwindcss.com/docs/border-width
|
1052
1182
|
##
|
1053
|
-
"border-w-b" => [{ "border-b" =>
|
1183
|
+
"border-w-b" => [{ "border-b" => SCALE_BORDER_WIDTH.call }],
|
1054
1184
|
##
|
1055
1185
|
# Border Width Left
|
1056
1186
|
# @see https://tailwindcss.com/docs/border-width
|
1057
1187
|
##
|
1058
|
-
"border-w-l" => [{ "border-l" =>
|
1059
|
-
|
1060
|
-
# Border Opacity
|
1061
|
-
# @see https://tailwindcss.com/docs/border-opacity
|
1062
|
-
##
|
1063
|
-
"border-opacity" => [{ "border-opacity" => [OPACITY] }],
|
1064
|
-
##
|
1065
|
-
# Border Style
|
1066
|
-
# @see https://tailwindcss.com/docs/border-style
|
1067
|
-
##
|
1068
|
-
"border-style" => [{ "border" => [*LINE_STYLES.call, "hidden"] }],
|
1188
|
+
"border-w-l" => [{ "border-l" => SCALE_BORDER_WIDTH.call }],
|
1189
|
+
|
1069
1190
|
##
|
1070
1191
|
# Divide Width X
|
1071
|
-
# @see https://tailwindcss.com/docs/
|
1192
|
+
# @see https://tailwindcss.com/docs/border-width#between-children
|
1072
1193
|
##
|
1073
|
-
"divide-x" => [{ "divide-x" =>
|
1194
|
+
"divide-x" => [{ "divide-x" => SCALE_BORDER_WIDTH.call }],
|
1074
1195
|
##
|
1075
1196
|
# Divide Width X Reverse
|
1076
1197
|
# @see https://tailwindcss.com/docs/divide-width
|
@@ -1080,97 +1201,142 @@ module TailwindMerge
|
|
1080
1201
|
# Divide Width Y
|
1081
1202
|
# @see https://tailwindcss.com/docs/divide-width
|
1082
1203
|
##
|
1083
|
-
"divide-y" => [{ "divide-y" =>
|
1204
|
+
"divide-y" => [{ "divide-y" => SCALE_BORDER_WIDTH.call }],
|
1084
1205
|
##
|
1085
1206
|
# Divide Width Y Reverse
|
1086
1207
|
# @see https://tailwindcss.com/docs/divide-width
|
1087
1208
|
##
|
1088
1209
|
"divide-y-reverse" => ["divide-y-reverse"],
|
1089
1210
|
##
|
1090
|
-
#
|
1091
|
-
# @see https://tailwindcss.com/docs/
|
1211
|
+
# Border Style
|
1212
|
+
# @see https://tailwindcss.com/docs/border-style
|
1092
1213
|
##
|
1093
|
-
"
|
1214
|
+
"border-style" => [{ "border" => [*SCALE_LINE_STYLE.call, "hidden", "none"] }],
|
1094
1215
|
##
|
1095
1216
|
# Divide Style
|
1096
1217
|
# @see https://tailwindcss.com/docs/divide-style
|
1097
1218
|
##
|
1098
|
-
"divide-style" => [{ "divide" =>
|
1219
|
+
"divide-style" => [{ "divide" => [*SCALE_LINE_STYLE.call, "hidden", "none"] }],
|
1099
1220
|
##
|
1100
1221
|
# Border Color
|
1101
1222
|
# @see https://tailwindcss.com/docs/border-color
|
1102
1223
|
##
|
1103
|
-
"border-color" => [{ "border" =>
|
1224
|
+
"border-color" => [{ "border" => SCALE_COLOR.call }],
|
1104
1225
|
##
|
1105
1226
|
# Border Color X
|
1106
1227
|
# @see https://tailwindcss.com/docs/border-color
|
1107
1228
|
##
|
1108
|
-
"border-color-x" => [{ "border-x" =>
|
1229
|
+
"border-color-x" => [{ "border-x" => SCALE_COLOR.call }],
|
1109
1230
|
##
|
1110
1231
|
# Border Color Y
|
1111
1232
|
# @see https://tailwindcss.com/docs/border-color
|
1112
1233
|
##
|
1113
|
-
"border-color-y" => [{ "border-y" =>
|
1234
|
+
"border-color-y" => [{ "border-y" => SCALE_COLOR.call }],
|
1114
1235
|
##
|
1115
1236
|
# Border Color S
|
1116
1237
|
# @see https://tailwindcss.com/docs/border-color
|
1117
1238
|
##
|
1118
|
-
"border-color-s" => [{ "border-s" =>
|
1239
|
+
"border-color-s" => [{ "border-s" => SCALE_COLOR.call }],
|
1119
1240
|
##
|
1120
1241
|
# Border Color E
|
1121
1242
|
# @see https://tailwindcss.com/docs/border-color
|
1122
1243
|
##
|
1123
|
-
"border-color-e" => [{ "border-e" =>
|
1244
|
+
"border-color-e" => [{ "border-e" => SCALE_COLOR.call }],
|
1124
1245
|
##
|
1125
1246
|
# Border Color Top
|
1126
1247
|
# @see https://tailwindcss.com/docs/border-color
|
1127
1248
|
##
|
1128
|
-
"border-color-t" => [{ "border-t" =>
|
1249
|
+
"border-color-t" => [{ "border-t" => SCALE_COLOR.call }],
|
1129
1250
|
##
|
1130
1251
|
# Border Color Right
|
1131
1252
|
# @see https://tailwindcss.com/docs/border-color
|
1132
1253
|
##
|
1133
|
-
"border-color-r" => [{ "border-r" =>
|
1254
|
+
"border-color-r" => [{ "border-r" => SCALE_COLOR.call }],
|
1134
1255
|
##
|
1135
1256
|
# Border Color Bottom
|
1136
1257
|
# @see https://tailwindcss.com/docs/border-color
|
1137
1258
|
##
|
1138
|
-
"border-color-b" => [{ "border-b" =>
|
1259
|
+
"border-color-b" => [{ "border-b" => SCALE_COLOR.call }],
|
1139
1260
|
##
|
1140
1261
|
# Border Color Left
|
1141
1262
|
# @see https://tailwindcss.com/docs/border-color
|
1142
1263
|
##
|
1143
|
-
"border-color-l" => [{ "border-l" =>
|
1264
|
+
"border-color-l" => [{ "border-l" => SCALE_COLOR.call }],
|
1144
1265
|
##
|
1145
1266
|
# Divide Color
|
1146
1267
|
# @see https://tailwindcss.com/docs/divide-color
|
1147
1268
|
##
|
1148
|
-
"divide-color" => [{ "divide" =>
|
1269
|
+
"divide-color" => [{ "divide" => SCALE_COLOR.call }],
|
1149
1270
|
##
|
1150
1271
|
# Outline Style
|
1151
1272
|
# @see https://tailwindcss.com/docs/outline-style
|
1152
1273
|
##
|
1153
|
-
"outline-style" => [{ "outline" => ["",
|
1274
|
+
"outline-style" => [{ "outline" => [*SCALE_LINE_STYLE.call, "none", "hidden"] }],
|
1154
1275
|
##
|
1155
1276
|
# Outline Offset
|
1156
1277
|
# @see https://tailwindcss.com/docs/outline-offset
|
1157
1278
|
##
|
1158
|
-
"outline-offset" => [{ "outline-offset" => [
|
1279
|
+
"outline-offset" => [{ "outline-offset" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1159
1280
|
##
|
1160
1281
|
# Outline Width
|
1161
1282
|
# @see https://tailwindcss.com/docs/outline-width
|
1162
1283
|
##
|
1163
|
-
"outline-w" => [{ "outline" => [
|
1284
|
+
"outline-w" => [{ "outline" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE_LENGTH, IS_ARBITRARY_LENGTH] }],
|
1164
1285
|
##
|
1165
1286
|
# Outline Color
|
1166
1287
|
# @see https://tailwindcss.com/docs/outline-color
|
1167
1288
|
##
|
1168
|
-
"outline-color" => [{ "outline" => [
|
1289
|
+
"outline-color" => [{ "outline" => [THEME_COLOR] }],
|
1290
|
+
|
1291
|
+
#########
|
1292
|
+
# Effects
|
1293
|
+
#########
|
1294
|
+
|
1295
|
+
##
|
1296
|
+
# Box Shadow
|
1297
|
+
# @see https://tailwindcss.com/docs/box-shadow
|
1298
|
+
##
|
1299
|
+
"shadow" => [
|
1300
|
+
{
|
1301
|
+
"shadow" => [
|
1302
|
+
# Deprecated since Tailwind CSS v4.0.0
|
1303
|
+
"",
|
1304
|
+
"none",
|
1305
|
+
THEME_SHADOW,
|
1306
|
+
IS_ARBITRARY_VARIABLE_SHADOW,
|
1307
|
+
IS_ARBITRARY_SHADOW,
|
1308
|
+
],
|
1309
|
+
},
|
1310
|
+
],
|
1311
|
+
##
|
1312
|
+
# Box Shadow Color
|
1313
|
+
# @see https://tailwindcss.com/docs/box-shadow-color
|
1314
|
+
##
|
1315
|
+
"shadow-color" => [{ "shadow" => SCALE_COLOR.call }],
|
1316
|
+
##
|
1317
|
+
# Inset Box Shadow
|
1318
|
+
# @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
1319
|
+
##
|
1320
|
+
"inset-shadow" => [
|
1321
|
+
{
|
1322
|
+
"inset-shadow" => [
|
1323
|
+
"none",
|
1324
|
+
IS_ARBITRARY_VARIABLE,
|
1325
|
+
IS_ARBITRARY_VALUE,
|
1326
|
+
THEME_INSET_SHADOW,
|
1327
|
+
],
|
1328
|
+
},
|
1329
|
+
],
|
1330
|
+
##
|
1331
|
+
# Inset Box Shadow Color
|
1332
|
+
# @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
1333
|
+
##
|
1334
|
+
"inset-shadow-color" => [{ "inset-shadow" => SCALE_COLOR.call }],
|
1169
1335
|
##
|
1170
1336
|
# Ring Width
|
1171
1337
|
# @see https://tailwindcss.com/docs/ring-width
|
1172
1338
|
##
|
1173
|
-
"ring-w" => [{ "ring" =>
|
1339
|
+
"ring-w" => [{ "ring" => SCALE_BORDER_WIDTH.call }],
|
1174
1340
|
##
|
1175
1341
|
# Ring Width Inset
|
1176
1342
|
# @see https://tailwindcss.com/docs/ring-width
|
@@ -1180,153 +1346,187 @@ module TailwindMerge
|
|
1180
1346
|
# Ring Color
|
1181
1347
|
# @see https://tailwindcss.com/docs/ring-color
|
1182
1348
|
##
|
1183
|
-
"ring-color" => [{ "ring" =>
|
1184
|
-
##
|
1185
|
-
# Ring Opacity
|
1186
|
-
# @see https://tailwindcss.com/docs/ring-opacity
|
1187
|
-
##
|
1188
|
-
"ring-opacity" => [{ "ring-opacity" => [OPACITY] }],
|
1349
|
+
"ring-color" => [{ "ring" => SCALE_COLOR.call }],
|
1189
1350
|
##
|
1190
1351
|
# Ring Offset Width
|
1191
|
-
# @see https://tailwindcss.com/docs/ring-offset-width
|
1352
|
+
# @see https://v3.tailwindcss.com/docs/ring-offset-width
|
1353
|
+
# @deprecated since Tailwind CSS v4.0.0
|
1354
|
+
# @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
1192
1355
|
##
|
1193
|
-
"ring-offset-w" => [{ "ring-offset" => [
|
1356
|
+
"ring-offset-w" => [{ "ring-offset" => [IS_NUMBER, IS_ARBITRARY_LENGTH] }],
|
1194
1357
|
##
|
1195
1358
|
# Ring Offset Color
|
1196
|
-
# @see https://tailwindcss.com/docs/ring-offset-color
|
1359
|
+
# @see https://v3.tailwindcss.com/docs/ring-offset-color
|
1360
|
+
# @deprecated since Tailwind CSS v4.0.0
|
1361
|
+
# @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
1197
1362
|
##
|
1198
|
-
"ring-offset-color" => [{ "ring-offset" =>
|
1199
|
-
# Effects
|
1363
|
+
"ring-offset-color" => [{ "ring-offset" => SCALE_COLOR.call }],
|
1200
1364
|
##
|
1201
|
-
#
|
1202
|
-
# @see https://tailwindcss.com/docs/box-shadow
|
1365
|
+
# Inset Ring Width
|
1366
|
+
# @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
1203
1367
|
##
|
1204
|
-
"
|
1368
|
+
"inset-ring-w" => [{ "inset-ring" => SCALE_BORDER_WIDTH.call }],
|
1205
1369
|
##
|
1206
|
-
#
|
1207
|
-
# @see https://tailwindcss.com/docs/box-shadow-color
|
1370
|
+
# Inset Ring Color
|
1371
|
+
# @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
1208
1372
|
##
|
1209
|
-
"
|
1373
|
+
"inset-ring-color" => [{ "inset-ring" => SCALE_COLOR.call }],
|
1210
1374
|
##
|
1211
1375
|
# Opacity
|
1212
1376
|
# @see https://tailwindcss.com/docs/opacity
|
1213
1377
|
##
|
1214
|
-
"opacity" => [{ "opacity" => [
|
1378
|
+
"opacity" => [{ "opacity" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1215
1379
|
##
|
1216
1380
|
# Mix Blend Mode
|
1217
1381
|
# @see https://tailwindcss.com/docs/mix-blend-mode
|
1218
1382
|
##
|
1219
|
-
"mix-blend" => [{ "mix-blend" =>
|
1383
|
+
"mix-blend" => [{ "mix-blend" => [*SCALE_BLEND_MODE.call, "plus-darker", "plus-lighter"] }],
|
1220
1384
|
##
|
1221
1385
|
# Background Blend Mode
|
1222
1386
|
# @see https://tailwindcss.com/docs/background-blend-mode
|
1223
1387
|
##
|
1224
|
-
"bg-blend" => [{ "bg-blend" =>
|
1388
|
+
"bg-blend" => [{ "bg-blend" => SCALE_BLEND_MODE.call }],
|
1389
|
+
|
1390
|
+
#########
|
1225
1391
|
# Filters
|
1392
|
+
#########
|
1393
|
+
|
1226
1394
|
##
|
1227
1395
|
# Filter
|
1228
1396
|
# @deprecated since Tailwind CSS v3.0.0
|
1229
1397
|
# @see https://tailwindcss.com/docs/filter
|
1230
1398
|
##
|
1231
|
-
"filter" => [
|
1399
|
+
"filter" => [
|
1400
|
+
{
|
1401
|
+
"filter" =>
|
1402
|
+
[
|
1403
|
+
# Deprecated since Tailwind CSS v3.0.0
|
1404
|
+
"",
|
1405
|
+
"none",
|
1406
|
+
IS_ARBITRARY_VARIABLE,
|
1407
|
+
IS_ARBITRARY_VALUE,
|
1408
|
+
],
|
1409
|
+
},
|
1410
|
+
],
|
1232
1411
|
##
|
1233
1412
|
# Blur
|
1234
1413
|
# @see https://tailwindcss.com/docs/blur
|
1235
1414
|
##
|
1236
|
-
"blur" => [{ "blur" =>
|
1415
|
+
"blur" => [{ "blur" => SCALE_BLUR.call }],
|
1237
1416
|
##
|
1238
1417
|
# Brightness
|
1239
1418
|
# @see https://tailwindcss.com/docs/brightness
|
1240
1419
|
##
|
1241
|
-
"brightness" => [{ "brightness" => [
|
1420
|
+
"brightness" => [{ "brightness" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1242
1421
|
##
|
1243
1422
|
# Contrast
|
1244
1423
|
# @see https://tailwindcss.com/docs/contrast
|
1245
1424
|
##
|
1246
|
-
"contrast" => [{ "contrast" => [
|
1425
|
+
"contrast" => [{ "contrast" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1247
1426
|
##
|
1248
1427
|
# Drop Shadow
|
1249
1428
|
# @see https://tailwindcss.com/docs/drop-shadow
|
1250
1429
|
##
|
1251
|
-
"drop-shadow" => [{
|
1430
|
+
"drop-shadow" => [{
|
1431
|
+
"drop-shadow" => [
|
1432
|
+
# Deprecated since Tailwind CSS v4.0.0
|
1433
|
+
"",
|
1434
|
+
"none",
|
1435
|
+
THEME_DROP_SHADOW,
|
1436
|
+
IS_ARBITRARY_VARIABLE,
|
1437
|
+
IS_ARBITRARY_VALUE,
|
1438
|
+
],
|
1439
|
+
}],
|
1252
1440
|
##
|
1253
1441
|
# Grayscale
|
1254
1442
|
# @see https://tailwindcss.com/docs/grayscale
|
1255
1443
|
##
|
1256
|
-
"grayscale" => [{ "grayscale" => [
|
1444
|
+
"grayscale" => [{ "grayscale" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1257
1445
|
##
|
1258
1446
|
# Hue Rotate
|
1259
1447
|
# @see https://tailwindcss.com/docs/hue-rotate
|
1260
1448
|
##
|
1261
|
-
"hue-rotate" => [{ "hue-rotate" => [
|
1449
|
+
"hue-rotate" => [{ "hue-rotate" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1262
1450
|
##
|
1263
1451
|
# Invert
|
1264
1452
|
# @see https://tailwindcss.com/docs/invert
|
1265
1453
|
##
|
1266
|
-
"invert" => [{ "invert" => [
|
1454
|
+
"invert" => [{ "invert" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1267
1455
|
##
|
1268
1456
|
# Saturate
|
1269
1457
|
# @see https://tailwindcss.com/docs/saturate
|
1270
1458
|
##
|
1271
|
-
"saturate" => [{ "saturate" => [
|
1459
|
+
"saturate" => [{ "saturate" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1272
1460
|
##
|
1273
1461
|
# Sepia
|
1274
1462
|
# @see https://tailwindcss.com/docs/sepia
|
1275
1463
|
##
|
1276
|
-
"sepia" => [{ "sepia" => [
|
1464
|
+
"sepia" => [{ "sepia" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1277
1465
|
##
|
1278
1466
|
# Backdrop Filter
|
1279
|
-
# @deprecated since Tailwind CSS v3.0.0
|
1280
1467
|
# @see https://tailwindcss.com/docs/backdrop-filter
|
1281
1468
|
##
|
1282
|
-
"backdrop-filter" => [{
|
1469
|
+
"backdrop-filter" => [{
|
1470
|
+
"backdrop-filter" => [
|
1471
|
+
# Deprecated since Tailwind CSS v3.0.0
|
1472
|
+
"",
|
1473
|
+
"none",
|
1474
|
+
IS_ARBITRARY_VARIABLE,
|
1475
|
+
IS_ARBITRARY_VALUE,
|
1476
|
+
],
|
1477
|
+
}],
|
1283
1478
|
##
|
1284
1479
|
# Backdrop Blur
|
1285
1480
|
# @see https://tailwindcss.com/docs/backdrop-blur
|
1286
1481
|
##
|
1287
|
-
"backdrop-blur" => [{ "backdrop-blur" =>
|
1482
|
+
"backdrop-blur" => [{ "backdrop-blur" => SCALE_BLUR.call }],
|
1288
1483
|
##
|
1289
1484
|
# Backdrop Brightness
|
1290
1485
|
# @see https://tailwindcss.com/docs/backdrop-brightness
|
1291
1486
|
##
|
1292
|
-
"backdrop-brightness" => [{
|
1487
|
+
"backdrop-brightness" => [{
|
1488
|
+
"backdrop-brightness" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE],
|
1489
|
+
}],
|
1293
1490
|
##
|
1294
1491
|
# Backdrop Contrast
|
1295
1492
|
# @see https://tailwindcss.com/docs/backdrop-contrast
|
1296
1493
|
##
|
1297
|
-
"backdrop-contrast" => [{ "backdrop-contrast" => [
|
1494
|
+
"backdrop-contrast" => [{ "backdrop-contrast" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1298
1495
|
##
|
1299
1496
|
# Backdrop Grayscale
|
1300
1497
|
# @see https://tailwindcss.com/docs/backdrop-grayscale
|
1301
1498
|
##
|
1302
|
-
"backdrop-grayscale" => [{ "backdrop-grayscale" => [
|
1499
|
+
"backdrop-grayscale" => [{ "backdrop-grayscale" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1303
1500
|
##
|
1304
1501
|
# Backdrop Hue Rotate
|
1305
1502
|
# @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
1306
1503
|
##
|
1307
|
-
"backdrop-hue-rotate" => [{ "backdrop-hue-rotate" => [
|
1504
|
+
"backdrop-hue-rotate" => [{ "backdrop-hue-rotate" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1308
1505
|
##
|
1309
1506
|
# Backdrop Invert
|
1310
1507
|
# @see https://tailwindcss.com/docs/backdrop-invert
|
1311
1508
|
##
|
1312
|
-
"backdrop-invert" => [{ "backdrop-invert" => [
|
1509
|
+
"backdrop-invert" => [{ "backdrop-invert" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1313
1510
|
##
|
1314
1511
|
# Backdrop Opacity
|
1315
1512
|
# @see https://tailwindcss.com/docs/backdrop-opacity
|
1316
1513
|
##
|
1317
|
-
"backdrop-opacity" => [{ "backdrop-opacity" => [
|
1514
|
+
"backdrop-opacity" => [{ "backdrop-opacity" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1318
1515
|
##
|
1319
1516
|
# Backdrop Saturate
|
1320
1517
|
# @see https://tailwindcss.com/docs/backdrop-saturate
|
1321
1518
|
##
|
1322
|
-
"backdrop-saturate" => [{ "backdrop-saturate" => [
|
1519
|
+
"backdrop-saturate" => [{ "backdrop-saturate" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1323
1520
|
##
|
1324
1521
|
# Backdrop Sepia
|
1325
1522
|
# @see https://tailwindcss.com/docs/backdrop-sepia
|
1326
1523
|
##
|
1327
|
-
"backdrop-sepia" => [{ "backdrop-sepia" => [
|
1524
|
+
"backdrop-sepia" => [{ "backdrop-sepia" => ["", IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1525
|
+
|
1526
|
+
########
|
1328
1527
|
# Tables
|
1329
|
-
|
1528
|
+
########
|
1529
|
+
|
1330
1530
|
# Border Collapse
|
1331
1531
|
# @see https://tailwindcss.com/docs/border-collapse
|
1332
1532
|
##
|
@@ -1335,17 +1535,17 @@ module TailwindMerge
|
|
1335
1535
|
# Border Spacing
|
1336
1536
|
# @see https://tailwindcss.com/docs/border-spacing
|
1337
1537
|
##
|
1338
|
-
"border-spacing" => [{ "border-spacing" =>
|
1538
|
+
"border-spacing" => [{ "border-spacing" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1339
1539
|
##
|
1340
1540
|
# Border Spacing X
|
1341
1541
|
# @see https://tailwindcss.com/docs/border-spacing
|
1342
1542
|
##
|
1343
|
-
"border-spacing-x" => [{ "border-spacing-x" =>
|
1543
|
+
"border-spacing-x" => [{ "border-spacing-x" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1344
1544
|
##
|
1345
1545
|
# Border Spacing Y
|
1346
1546
|
# @see https://tailwindcss.com/docs/border-spacing
|
1347
1547
|
##
|
1348
|
-
"border-spacing-y" => [{ "border-spacing-y" =>
|
1548
|
+
"border-spacing-y" => [{ "border-spacing-y" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1349
1549
|
##
|
1350
1550
|
# Table Layout
|
1351
1551
|
# @see https://tailwindcss.com/docs/table-layout
|
@@ -1356,123 +1556,207 @@ module TailwindMerge
|
|
1356
1556
|
# @see https://tailwindcss.com/docs/caption-side
|
1357
1557
|
#
|
1358
1558
|
"caption" => [{ "caption" => ["top", "bottom"] }],
|
1559
|
+
|
1560
|
+
#############################
|
1359
1561
|
# Transitions and Animation
|
1360
|
-
|
1562
|
+
#############################
|
1563
|
+
|
1361
1564
|
# Tranisition Property
|
1362
1565
|
# @see https://tailwindcss.com/docs/transition-property
|
1363
1566
|
##
|
1364
1567
|
"transition" => [
|
1365
1568
|
{
|
1366
1569
|
"transition" => [
|
1367
|
-
"none",
|
1368
|
-
"all",
|
1369
1570
|
"",
|
1571
|
+
"all",
|
1370
1572
|
"colors",
|
1371
1573
|
"opacity",
|
1372
1574
|
"shadow",
|
1373
1575
|
"transform",
|
1576
|
+
"none",
|
1577
|
+
IS_ARBITRARY_VARIABLE,
|
1374
1578
|
IS_ARBITRARY_VALUE,
|
1375
1579
|
],
|
1376
1580
|
},
|
1377
1581
|
],
|
1378
1582
|
##
|
1583
|
+
# Transition Behavior
|
1584
|
+
# @see https://tailwindcss.com/docs/transition-behavior
|
1585
|
+
##
|
1586
|
+
"transition-behavior" => [{ "transition" => ["normal", "discrete"] }],
|
1587
|
+
##
|
1379
1588
|
# Transition Duration
|
1380
1589
|
# @see https://tailwindcss.com/docs/transition-duration
|
1381
1590
|
##
|
1382
|
-
"duration" => [{ "duration" =>
|
1591
|
+
"duration" => [{ "duration" => [IS_NUMBER, "initial", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1383
1592
|
##
|
1384
1593
|
# Transition Timing Function
|
1385
1594
|
# @see https://tailwindcss.com/docs/transition-timing-function
|
1386
1595
|
##
|
1387
|
-
"ease" => [{ "ease" => ["linear", "
|
1596
|
+
"ease" => [{ "ease" => ["linear", "initial", THEME_EASE, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1388
1597
|
##
|
1389
1598
|
# Transition Delay
|
1390
1599
|
# @see https://tailwindcss.com/docs/transition-delay
|
1391
1600
|
##
|
1392
|
-
"delay" => [{ "delay" =>
|
1601
|
+
"delay" => [{ "delay" => [IS_NUMBER, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1393
1602
|
##
|
1394
1603
|
# Animation
|
1395
1604
|
# @see https://tailwindcss.com/docs/animation
|
1396
1605
|
##
|
1397
|
-
"animate" => [{ "animate" => ["none",
|
1606
|
+
"animate" => [{ "animate" => ["none", THEME_ANIMATE, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }],
|
1607
|
+
|
1608
|
+
#############
|
1398
1609
|
# Transforms
|
1610
|
+
#############
|
1611
|
+
|
1399
1612
|
##
|
1400
|
-
#
|
1401
|
-
# @see https://tailwindcss.com/docs/
|
1613
|
+
# Backface Visibility
|
1614
|
+
# @see https://tailwindcss.com/docs/backface-visibility
|
1402
1615
|
##
|
1403
|
-
"
|
1616
|
+
"backface" => [{ "backface" => ["hidden", "visible"] }],
|
1617
|
+
##
|
1618
|
+
# Perspective
|
1619
|
+
# @see https://tailwindcss.com/docs/perspective
|
1620
|
+
##
|
1621
|
+
"perspective" => [
|
1622
|
+
{ "perspective" => [THEME_PERSPECTIVE, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] },
|
1623
|
+
],
|
1624
|
+
##
|
1625
|
+
# Perspective Origin
|
1626
|
+
# @see https://tailwindcss.com/docs/perspective-origin
|
1627
|
+
##
|
1628
|
+
"perspective-origin" => [{ "perspective-origin" => SCALE_ORIGIN.call }],
|
1629
|
+
##
|
1630
|
+
# Rotate
|
1631
|
+
# @see https://tailwindcss.com/docs/rotate
|
1632
|
+
##
|
1633
|
+
"rotate" => [{ "rotate" => SCALE_ROTATE.call }],
|
1634
|
+
##
|
1635
|
+
# Rotate X
|
1636
|
+
# @see https://tailwindcss.com/docs/rotate
|
1637
|
+
##
|
1638
|
+
"rotate-x" => [{ "rotate-x": SCALE_ROTATE.call }],
|
1639
|
+
##
|
1640
|
+
# Rotate Y
|
1641
|
+
# @see https://tailwindcss.com/docs/rotate
|
1642
|
+
##
|
1643
|
+
"rotate-y" => [{ "rotate-y": SCALE_ROTATE.call }],
|
1644
|
+
##
|
1645
|
+
# Rotate Z
|
1646
|
+
# @see https://tailwindcss.com/docs/rotate
|
1647
|
+
##
|
1648
|
+
"rotate-z" => [{ "rotate-z": SCALE_ROTATE.call }],
|
1404
1649
|
##
|
1405
1650
|
# Scale
|
1406
1651
|
# @see https://tailwindcss.com/docs/scale
|
1407
1652
|
##
|
1408
|
-
"scale" => [{ "scale" =>
|
1653
|
+
"scale" => [{ "scale" => SCALE_SCALE.call }],
|
1409
1654
|
##
|
1410
1655
|
# Scale X
|
1411
1656
|
# @see https://tailwindcss.com/docs/scale
|
1412
1657
|
##
|
1413
|
-
"scale-x" => [{ "scale-x" =>
|
1658
|
+
"scale-x" => [{ "scale-x" => SCALE_SCALE.call }],
|
1414
1659
|
##
|
1415
1660
|
# Scale Y
|
1416
1661
|
# @see https://tailwindcss.com/docs/scale
|
1417
1662
|
##
|
1418
|
-
"scale-y" => [{ "scale-y" =>
|
1663
|
+
"scale-y" => [{ "scale-y" => SCALE_SCALE.call }],
|
1419
1664
|
##
|
1420
|
-
#
|
1421
|
-
# @see https://tailwindcss.com/docs/
|
1665
|
+
# Scale Z
|
1666
|
+
# @see https://tailwindcss.com/docs/scale
|
1422
1667
|
##
|
1423
|
-
"
|
1668
|
+
"scale-z" => [{ "scale-z" => SCALE_SCALE.call }],
|
1424
1669
|
##
|
1425
|
-
#
|
1426
|
-
# @see https://tailwindcss.com/docs/
|
1670
|
+
# Scale 3D
|
1671
|
+
# @see https://tailwindcss.com/docs/scale
|
1427
1672
|
##
|
1428
|
-
"
|
1673
|
+
"scale-3d" => ["scale-3d"],
|
1429
1674
|
##
|
1430
|
-
#
|
1431
|
-
# @see https://tailwindcss.com/docs/
|
1675
|
+
# Skew
|
1676
|
+
# @see https://tailwindcss.com/docs/skew
|
1432
1677
|
##
|
1433
|
-
"
|
1678
|
+
"skew" => [{ "skew" => SCALE_SKEW.call }],
|
1434
1679
|
##
|
1435
1680
|
# Skew X
|
1436
1681
|
# @see https://tailwindcss.com/docs/skew
|
1437
1682
|
##
|
1438
|
-
"skew-x" => [{ "skew-x"
|
1683
|
+
"skew-x" => [{ "skew-x": SCALE_SKEW.call }],
|
1439
1684
|
##
|
1440
1685
|
# Skew Y
|
1441
1686
|
# @see https://tailwindcss.com/docs/skew
|
1442
1687
|
##
|
1443
|
-
"skew-y" => [{ "skew-y"
|
1688
|
+
"skew-y" => [{ "skew-y": SCALE_SKEW.call }],
|
1689
|
+
# Transform
|
1690
|
+
# @see https://tailwindcss.com/docs/transform
|
1691
|
+
##
|
1692
|
+
"transform" => [{ "transform" => [IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE, "", "none", "gpu", "cpu"] }],
|
1444
1693
|
##
|
1445
1694
|
# Transform Origin
|
1446
1695
|
# @see https://tailwindcss.com/docs/transform-origin
|
1447
1696
|
##
|
1448
1697
|
"transform-origin" => [
|
1449
1698
|
{
|
1450
|
-
"origin" =>
|
1451
|
-
"center",
|
1452
|
-
"top",
|
1453
|
-
"top-right",
|
1454
|
-
"right",
|
1455
|
-
"bottom-right",
|
1456
|
-
"bottom",
|
1457
|
-
"bottom-left",
|
1458
|
-
"left",
|
1459
|
-
"top-left",
|
1460
|
-
IS_ARBITRARY_VALUE,
|
1461
|
-
],
|
1699
|
+
"origin" => SCALE_ORIGIN.call,
|
1462
1700
|
},
|
1463
1701
|
],
|
1702
|
+
##
|
1703
|
+
# Transform Style
|
1704
|
+
# @see https://tailwindcss.com/docs/transform-style
|
1705
|
+
##
|
1706
|
+
"transform-style" => [{ "transform" => ["3d", "flat"] }],
|
1707
|
+
##
|
1708
|
+
# Translate
|
1709
|
+
# @see https://tailwindcss.com/docs/translate
|
1710
|
+
##
|
1711
|
+
"translate" => [{ "translate" => SCALE_TRANSLATE.call }],
|
1712
|
+
##
|
1713
|
+
# Translate X
|
1714
|
+
# @see https://tailwindcss.com/docs/translate
|
1715
|
+
##
|
1716
|
+
"translate-x" => [{ "translate-x" => SCALE_TRANSLATE.call }],
|
1717
|
+
##
|
1718
|
+
# Translate Y
|
1719
|
+
# @see https://tailwindcss.com/docs/translate
|
1720
|
+
##
|
1721
|
+
"translate-y" => [{ "translate-y" => SCALE_TRANSLATE.call }],
|
1722
|
+
##
|
1723
|
+
# Translate Z
|
1724
|
+
# @see https://tailwindcss.com/docs/translate
|
1725
|
+
##
|
1726
|
+
"translate-z" => [{ "translate-z" => SCALE_TRANSLATE.call }],
|
1727
|
+
##
|
1728
|
+
# Translate None
|
1729
|
+
# @see https://tailwindcss.com/docs/translate
|
1730
|
+
##
|
1731
|
+
"translate-none" => ["translate-none"],
|
1732
|
+
|
1733
|
+
###############
|
1464
1734
|
# Interactivity
|
1735
|
+
###############
|
1736
|
+
|
1465
1737
|
##
|
1466
1738
|
# Accent Color
|
1467
1739
|
# @see https://tailwindcss.com/docs/accent-color
|
1468
1740
|
##
|
1469
|
-
"accent" => [{ "accent" =>
|
1741
|
+
"accent" => [{ "accent" => SCALE_COLOR.call }],
|
1470
1742
|
##
|
1471
1743
|
# Appearance
|
1472
1744
|
# @see https://tailwindcss.com/docs/appearance
|
1473
1745
|
##
|
1474
1746
|
"appearance" => [{ "appearance" => ["none", "auto"] }],
|
1475
1747
|
##
|
1748
|
+
# Caret Color
|
1749
|
+
# @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
1750
|
+
##
|
1751
|
+
"caret-color" => [{ "caret" => SCALE_COLOR.call }],
|
1752
|
+
##
|
1753
|
+
# Color Scheme
|
1754
|
+
# @see https://tailwindcss.com/docs/color-scheme
|
1755
|
+
##
|
1756
|
+
"color-scheme" => [
|
1757
|
+
{ "scheme" => ["normal", "dark", "light", "light-dark", "only-dark", "only-light"] },
|
1758
|
+
],
|
1759
|
+
##
|
1476
1760
|
# Cursor
|
1477
1761
|
# @see https://tailwindcss.com/docs/cursor
|
1478
1762
|
##
|
@@ -1515,15 +1799,16 @@ module TailwindMerge
|
|
1515
1799
|
"nwse-resize",
|
1516
1800
|
"zoom-in",
|
1517
1801
|
"zoom-out",
|
1802
|
+
IS_ARBITRARY_VARIABLE,
|
1518
1803
|
IS_ARBITRARY_VALUE,
|
1519
1804
|
],
|
1520
1805
|
},
|
1521
1806
|
],
|
1522
1807
|
##
|
1523
|
-
#
|
1524
|
-
# @see https://tailwindcss.com/docs/
|
1808
|
+
# Field Sizing
|
1809
|
+
# @see https://tailwindcss.com/docs/field-sizing
|
1525
1810
|
##
|
1526
|
-
"
|
1811
|
+
"field-sizing" => [{ "field-sizing" => ["fixed", "content"] }],
|
1527
1812
|
##
|
1528
1813
|
# Pointer Events
|
1529
1814
|
# @see https://tailwindcss.com/docs/pointer-events
|
@@ -1533,7 +1818,7 @@ module TailwindMerge
|
|
1533
1818
|
# Resize
|
1534
1819
|
# @see https://tailwindcss.com/docs/resize
|
1535
1820
|
##
|
1536
|
-
"resize" => [{ "resize" => ["none", "
|
1821
|
+
"resize" => [{ "resize" => ["none", "", "y", "x"] }],
|
1537
1822
|
##
|
1538
1823
|
# Scroll Behavior
|
1539
1824
|
# @see https://tailwindcss.com/docs/scroll-behavior
|
@@ -1543,92 +1828,92 @@ module TailwindMerge
|
|
1543
1828
|
# Scroll Margin
|
1544
1829
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1545
1830
|
##
|
1546
|
-
"scroll-m" => [{ "scroll-m" =>
|
1831
|
+
"scroll-m" => [{ "scroll-m" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1547
1832
|
##
|
1548
1833
|
# Scroll Margin X
|
1549
1834
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1550
1835
|
##
|
1551
|
-
"scroll-mx" => [{ "scroll-mx" =>
|
1836
|
+
"scroll-mx" => [{ "scroll-mx" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1552
1837
|
##
|
1553
1838
|
# Scroll Margin Y
|
1554
1839
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1555
1840
|
##
|
1556
|
-
"scroll-my" => [{ "scroll-my" =>
|
1841
|
+
"scroll-my" => [{ "scroll-my" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1557
1842
|
#
|
1558
1843
|
# Scroll Margin Start
|
1559
1844
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1560
1845
|
#
|
1561
|
-
"scroll-ms" => [{ "scroll-ms" =>
|
1846
|
+
"scroll-ms" => [{ "scroll-ms" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1562
1847
|
#
|
1563
1848
|
# Scroll Margin End
|
1564
1849
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1565
1850
|
#
|
1566
|
-
"scroll-me" => [{ "scroll-me" =>
|
1851
|
+
"scroll-me" => [{ "scroll-me" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1567
1852
|
##
|
1568
1853
|
# Scroll Margin Top
|
1569
1854
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1570
1855
|
##
|
1571
|
-
"scroll-mt" => [{ "scroll-mt" =>
|
1856
|
+
"scroll-mt" => [{ "scroll-mt" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1572
1857
|
##
|
1573
1858
|
# Scroll Margin Right
|
1574
1859
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1575
1860
|
##
|
1576
|
-
"scroll-mr" => [{ "scroll-mr" =>
|
1861
|
+
"scroll-mr" => [{ "scroll-mr" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1577
1862
|
##
|
1578
1863
|
# Scroll Margin Bottom
|
1579
1864
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1580
1865
|
##
|
1581
|
-
"scroll-mb" => [{ "scroll-mb" =>
|
1866
|
+
"scroll-mb" => [{ "scroll-mb" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1582
1867
|
##
|
1583
1868
|
# Scroll Margin Left
|
1584
1869
|
# @see https://tailwindcss.com/docs/scroll-margin
|
1585
1870
|
##
|
1586
|
-
"scroll-ml" => [{ "scroll-ml" =>
|
1871
|
+
"scroll-ml" => [{ "scroll-ml" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1587
1872
|
##
|
1588
1873
|
# Scroll Padding
|
1589
1874
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1590
1875
|
##
|
1591
|
-
"scroll-p" => [{ "scroll-p" =>
|
1876
|
+
"scroll-p" => [{ "scroll-p" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1592
1877
|
##
|
1593
1878
|
# Scroll Padding X
|
1594
1879
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1595
1880
|
##
|
1596
|
-
"scroll-px" => [{ "scroll-px" =>
|
1881
|
+
"scroll-px" => [{ "scroll-px" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1597
1882
|
##
|
1598
1883
|
# Scroll Padding Y
|
1599
1884
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1600
1885
|
##
|
1601
|
-
"scroll-py" => [{ "scroll-py" =>
|
1886
|
+
"scroll-py" => [{ "scroll-py" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1602
1887
|
#
|
1603
1888
|
# Scroll Padding Start
|
1604
1889
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1605
1890
|
#
|
1606
|
-
"scroll-ps" => [{ "scroll-ps" =>
|
1891
|
+
"scroll-ps" => [{ "scroll-ps" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1607
1892
|
#
|
1608
1893
|
# Scroll Padding End
|
1609
1894
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1610
1895
|
#
|
1611
|
-
"scroll-pe" => [{ "scroll-pe" =>
|
1896
|
+
"scroll-pe" => [{ "scroll-pe" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1612
1897
|
##
|
1613
1898
|
# Scroll Padding Top
|
1614
1899
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1615
1900
|
##
|
1616
|
-
"scroll-pt" => [{ "scroll-pt" =>
|
1901
|
+
"scroll-pt" => [{ "scroll-pt" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1617
1902
|
##
|
1618
1903
|
# Scroll Padding Right
|
1619
1904
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1620
1905
|
##
|
1621
|
-
"scroll-pr" => [{ "scroll-pr" =>
|
1906
|
+
"scroll-pr" => [{ "scroll-pr" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1622
1907
|
##
|
1623
1908
|
# Scroll Padding Bottom
|
1624
1909
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1625
1910
|
##
|
1626
|
-
"scroll-pb" => [{ "scroll-pb" =>
|
1911
|
+
"scroll-pb" => [{ "scroll-pb" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1627
1912
|
##
|
1628
1913
|
# Scroll Padding Left
|
1629
1914
|
# @see https://tailwindcss.com/docs/scroll-padding
|
1630
1915
|
##
|
1631
|
-
"scroll-pl" => [{ "scroll-pl" =>
|
1916
|
+
"scroll-pl" => [{ "scroll-pl" => SCALE_UNAMBIGUOUS_SPACING.call }],
|
1632
1917
|
##
|
1633
1918
|
# Scroll Snap Align
|
1634
1919
|
# @see https://tailwindcss.com/docs/scroll-snap-align
|
@@ -1691,35 +1976,38 @@ module TailwindMerge
|
|
1691
1976
|
# @see https://tailwindcss.com/docs/will-change
|
1692
1977
|
##
|
1693
1978
|
"will-change" => [
|
1694
|
-
{ "will-change" => ["auto", "scroll", "contents", "transform", IS_ARBITRARY_VALUE] },
|
1979
|
+
{ "will-change" => ["auto", "scroll", "contents", "transform", IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] },
|
1695
1980
|
],
|
1981
|
+
|
1982
|
+
######
|
1696
1983
|
# SVG
|
1984
|
+
######
|
1985
|
+
|
1697
1986
|
##
|
1698
1987
|
# Fill
|
1699
1988
|
# @see https://tailwindcss.com/docs/fill
|
1700
1989
|
##
|
1701
|
-
"fill" => [{ "fill" => [
|
1990
|
+
"fill" => [{ "fill" => ["none", *SCALE_COLOR.call] }],
|
1702
1991
|
##
|
1703
1992
|
# Stroke Width
|
1704
1993
|
# @see https://tailwindcss.com/docs/stroke-width
|
1705
1994
|
##
|
1706
|
-
"stroke-w" => [{ "stroke" => [
|
1995
|
+
"stroke-w" => [{ "stroke" => [IS_NUMBER, IS_ARBITRARY_VARIABLE_LENGTH, IS_ARBITRARY_LENGTH, IS_ARBITRARY_NUMBER] }],
|
1707
1996
|
##
|
1708
1997
|
# Stroke
|
1709
1998
|
# @see https://tailwindcss.com/docs/stroke
|
1710
1999
|
##
|
1711
|
-
"stroke" => [{ "stroke" => [
|
2000
|
+
"stroke" => [{ "stroke" => ["none", *SCALE_COLOR.call] }],
|
2001
|
+
|
2002
|
+
################
|
1712
2003
|
# Accessibility
|
1713
|
-
|
1714
|
-
|
1715
|
-
# @see https://tailwindcss.com/docs/screen-readers
|
1716
|
-
##
|
1717
|
-
"sr" => ["sr-only", "not-sr-only"],
|
2004
|
+
################
|
2005
|
+
|
1718
2006
|
##
|
1719
2007
|
# Forced Color Adjust
|
1720
2008
|
# @see https://tailwindcss.com/docs/forced-color-adjust
|
1721
2009
|
##
|
1722
|
-
"forced-color-adjust" => [{ "forced-color-adjust"
|
2010
|
+
"forced-color-adjust" => [{ "forced-color-adjust" => ["auto", "none"] }],
|
1723
2011
|
},
|
1724
2012
|
conflicting_class_groups: {
|
1725
2013
|
"overflow" => ["overflow-x", "overflow-y"],
|
@@ -1793,6 +2081,8 @@ module TailwindMerge
|
|
1793
2081
|
],
|
1794
2082
|
"border-color-x" => ["border-color-r", "border-color-l"],
|
1795
2083
|
"border-color-y" => ["border-color-t", "border-color-b"],
|
2084
|
+
"translate" => ["translate-x", "translate-y", "translate-none"],
|
2085
|
+
"translate-none" => ["translate", "translate-x", "translate-y", "translate-z"],
|
1796
2086
|
"scroll-m" => [
|
1797
2087
|
"scroll-mx",
|
1798
2088
|
"scroll-my",
|
@@ -1823,21 +2113,36 @@ module TailwindMerge
|
|
1823
2113
|
"touch-pz" => ["touch"],
|
1824
2114
|
},
|
1825
2115
|
conflicting_class_group_modifiers: {
|
1826
|
-
"font-size"
|
2116
|
+
"font-size" => ["leading"],
|
1827
2117
|
},
|
2118
|
+
order_sensitive_modifiers: [
|
2119
|
+
"before",
|
2120
|
+
"after",
|
2121
|
+
"placeholder",
|
2122
|
+
"file",
|
2123
|
+
"marker",
|
2124
|
+
"selection",
|
2125
|
+
"first-line",
|
2126
|
+
"first-letter",
|
2127
|
+
"backdrop",
|
2128
|
+
"*",
|
2129
|
+
"**",
|
2130
|
+
],
|
1828
2131
|
}.freeze
|
1829
2132
|
|
1830
|
-
def
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
2133
|
+
def merge_config(incoming_config)
|
2134
|
+
extended_config = TailwindMerge::Config::DEFAULTS.dup
|
2135
|
+
|
2136
|
+
incoming_theme = incoming_config.delete(:theme) || {}
|
2137
|
+
# if the incoming config has a theme, we...
|
2138
|
+
incoming_theme.each_pair do |key, scales|
|
2139
|
+
# ...add new scales to the existing ones
|
2140
|
+
extended_config[:theme][key] << ->(klass) {
|
2141
|
+
scales.include?(klass)
|
2142
|
+
}
|
1838
2143
|
end
|
1839
2144
|
|
1840
|
-
|
2145
|
+
extended_config.merge(incoming_config)
|
1841
2146
|
end
|
1842
2147
|
end
|
1843
2148
|
end
|