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