tailwind_merge 1.3.3 → 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 783e008ab85c57a6d835bcd2c2aeb0bf1c3ee97706a42673dc89a798534295a1
4
- data.tar.gz: 48641de285e39bee44cde99ecc9977edea9da0541358d308cf6d28e53bb5ab48
3
+ metadata.gz: c92f465b5aa6ea57a71afc60b37c61b05986667919ff88754a97b846921e191c
4
+ data.tar.gz: e83db43c20ac8b867dd8c2dfb0450c6e5a5de3a6c03dc37563bc787b4f71f0e3
5
5
  SHA512:
6
- metadata.gz: e1b4bbf12cc96c9480ebe0313569a1938ef210b8df82e42253e7edba1c9657923bc03eb874152dac5a910b2f3f7d8ca5731cc01826ab3373097b54652a89d5e9
7
- data.tar.gz: 27d39e9beaad0731d1a64cdcc0d0831c9f29b5dd36c949e0a667fc6de4ca3759ff0202875a94c1be5ae1955c1da714f2c2ee1dab2f62c961ddb142ad02ae1b4e
6
+ metadata.gz: 3ab5af9395abec32b81c841db1e2a5a54b6b96456167fae54d5792264cb2effcc3605ab1ee3a33ca84e45262267839ff70846caf09786aab284e5cdfda330fc8
7
+ data.tar.gz: e91081abf6c23662126192a2c2431497bbcda86e95bd25be166ecde54fa2a447cf664300d190af4e424cb1af1428e086730aba557fc826e6d71b77d10a83293e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [v1.4.0] - 22-02-2026
2
+ ## What's Changed
3
+ * Support Tailwind v4.2 by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/73
4
+
5
+
6
+ **Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v1.3.3...v1.4.0
1
7
  # [v1.3.3] - 31-01-2026
2
8
  ## What's Changed
3
9
  * Update minitest requirement from ~> 5.6 to ~> 6.0 in the bundler-dependencies group by @dependabot[bot] in https://github.com/gjtorikian/tailwind_merge/pull/70
@@ -102,6 +102,35 @@ module TailwindMerge
102
102
  *SCALE_UNAMBIGUOUS_SPACING.call,
103
103
  ]
104
104
  }
105
+ SCALE_SIZING_INLINE = -> {
106
+ [
107
+ IS_FRACTION,
108
+ "screen",
109
+ "full",
110
+ "dvw",
111
+ "lvw",
112
+ "svw",
113
+ "min",
114
+ "max",
115
+ "fit",
116
+ *SCALE_UNAMBIGUOUS_SPACING.call,
117
+ ]
118
+ }
119
+ SCALE_SIZING_BLOCK = -> {
120
+ [
121
+ IS_FRACTION,
122
+ "screen",
123
+ "full",
124
+ "lh",
125
+ "dvh",
126
+ "lvh",
127
+ "svh",
128
+ "min",
129
+ "max",
130
+ "fit",
131
+ *SCALE_UNAMBIGUOUS_SPACING.call,
132
+ ]
133
+ }
105
134
  SCALE_COLOR = -> { [THEME_COLOR, IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE] }
106
135
  SCALE_BG_POSITION = -> { [*SCALE_POSITION.call, IS_ARBITRARY_VARIABLE_POSITION, IS_ARBITRARY_POSITION, "position" => [IS_ARBITRARY_VARIABLE, IS_ARBITRARY_VALUE]] }
107
136
  SCALE_BG_REPEAT = -> { ["no-repeat", "repeat" => ["", "x", "y", "space", "round"]] }
@@ -359,12 +388,22 @@ module TailwindMerge
359
388
  # Start
360
389
  # @see https://tailwindcss.com/docs/top-right-bottom-left
361
390
  #
362
- "start" => [{ "start" => [SCALE_INSET] }],
391
+ "start" => [{ "inset-s" => [SCALE_INSET], "start" => [SCALE_INSET] }],
363
392
  #
364
393
  # End
365
394
  # @see https://tailwindcss.com/docs/top-right-bottom-left
366
395
  #
367
- "end" => [{ "end" => [SCALE_INSET] }],
396
+ "end" => [{ "inset-e" => [SCALE_INSET], "end" => [SCALE_INSET] }],
397
+ #
398
+ # Inset Block Start
399
+ # @see https://tailwindcss.com/docs/top-right-bottom-left
400
+ #
401
+ "inset-bs" => [{ "inset-bs" => [SCALE_INSET] }],
402
+ #
403
+ # Inset Block End
404
+ # @see https://tailwindcss.com/docs/top-right-bottom-left
405
+ #
406
+ "inset-be" => [{ "inset-be" => [SCALE_INSET] }],
368
407
  ##
369
408
  # Top
370
409
  # @see https://tailwindcss.com/docs/top-right-bottom-left
@@ -593,6 +632,16 @@ module TailwindMerge
593
632
  # @see https://tailwindcss.com/docs/padding
594
633
  #
595
634
  "pe" => [{ "pe" => SCALE_UNAMBIGUOUS_SPACING.call }],
635
+ #
636
+ # Padding Block Start
637
+ # @see https://tailwindcss.com/docs/padding
638
+ #
639
+ "pbs" => [{ "pbs" => SCALE_UNAMBIGUOUS_SPACING.call }],
640
+ #
641
+ # Padding Block End
642
+ # @see https://tailwindcss.com/docs/padding
643
+ #
644
+ "pbe" => [{ "pbe" => SCALE_UNAMBIGUOUS_SPACING.call }],
596
645
  ##
597
646
  # Padding Top
598
647
  # @see https://tailwindcss.com/docs/padding
@@ -638,6 +687,16 @@ module TailwindMerge
638
687
  # @see https://tailwindcss.com/docs/margin
639
688
  #
640
689
  "me" => [{ "me" => SCALE_MARGIN.call }],
690
+ #
691
+ # Margin Block Start
692
+ # @see https://tailwindcss.com/docs/margin
693
+ #
694
+ "mbs" => [{ "mbs" => SCALE_MARGIN.call }],
695
+ #
696
+ # Margin Block End
697
+ # @see https://tailwindcss.com/docs/margin
698
+ #
699
+ "mbe" => [{ "mbe" => SCALE_MARGIN.call }],
641
700
  ##
642
701
  # Margin Top
643
702
  # @see https://tailwindcss.com/docs/margin
@@ -688,6 +747,30 @@ module TailwindMerge
688
747
  # @see https://tailwindcss.com/docs/width#setting-both-width-and-height
689
748
  ##
690
749
  "size" => [{ "size" => SCALE_SIZING.call }],
750
+ ##
751
+ # Inline Size
752
+ ##
753
+ "inline-size" => [{ "inline" => ["auto", *SCALE_SIZING_INLINE.call] }],
754
+ ##
755
+ # Min Inline Size
756
+ ##
757
+ "min-inline-size" => [{ "min-inline" => ["auto", *SCALE_SIZING_INLINE.call] }],
758
+ ##
759
+ # Max Inline Size
760
+ ##
761
+ "max-inline-size" => [{ "max-inline" => ["none", *SCALE_SIZING_INLINE.call] }],
762
+ ##
763
+ # Block Size
764
+ ##
765
+ "block-size" => [{ "block" => ["auto", *SCALE_SIZING_BLOCK.call] }],
766
+ ##
767
+ # Min Block Size
768
+ ##
769
+ "min-block-size" => [{ "min-block" => ["auto", *SCALE_SIZING_BLOCK.call] }],
770
+ ##
771
+ # Max Block Size
772
+ ##
773
+ "max-block-size" => [{ "max-block" => ["none", *SCALE_SIZING_BLOCK.call] }],
691
774
  # Width
692
775
  # @see https://tailwindcss.com/docs/width
693
776
  ##
@@ -801,6 +884,10 @@ module TailwindMerge
801
884
  ##
802
885
  "font-family" => [{ "font" => [IS_ARBITRARY_VARIABLE_FAMILY_NAME, IS_ARBITRARY_FAMILY_NAME, THEME_FONT] }],
803
886
  ##
887
+ # Font Feature Settings
888
+ ##
889
+ "font-features" => [{ "font-features" => [IS_ARBITRARY_VALUE] }],
890
+ ##
804
891
  # Font Variant Numeric
805
892
  # @see https://tailwindcss.com/docs/font-variant-numeric
806
893
  ##
@@ -1173,6 +1260,16 @@ module TailwindMerge
1173
1260
  # @see https://tailwindcss.com/docs/border-width
1174
1261
  #
1175
1262
  "border-w-e" => [{ "border-e" => SCALE_BORDER_WIDTH.call }],
1263
+ #
1264
+ # Border Width Block Start
1265
+ # @see https://tailwindcss.com/docs/border-width
1266
+ #
1267
+ "border-w-bs" => [{ "border-bs" => SCALE_BORDER_WIDTH.call }],
1268
+ #
1269
+ # Border Width Block End
1270
+ # @see https://tailwindcss.com/docs/border-width
1271
+ #
1272
+ "border-w-be" => [{ "border-be" => SCALE_BORDER_WIDTH.call }],
1176
1273
  ##
1177
1274
  # Border Width Top
1178
1275
  # @see https://tailwindcss.com/docs/border-width
@@ -1249,6 +1346,16 @@ module TailwindMerge
1249
1346
  # @see https://tailwindcss.com/docs/border-color
1250
1347
  ##
1251
1348
  "border-color-e" => [{ "border-e" => SCALE_COLOR.call }],
1349
+ #
1350
+ # Border Color Block Start
1351
+ # @see https://tailwindcss.com/docs/border-color
1352
+ #
1353
+ "border-color-bs" => [{ "border-bs" => SCALE_COLOR.call }],
1354
+ #
1355
+ # Border Color Block End
1356
+ # @see https://tailwindcss.com/docs/border-color
1357
+ #
1358
+ "border-color-be" => [{ "border-be" => SCALE_COLOR.call }],
1252
1359
  ##
1253
1360
  # Border Color Top
1254
1361
  # @see https://tailwindcss.com/docs/border-color
@@ -1978,6 +2085,16 @@ module TailwindMerge
1978
2085
  # @see https://tailwindcss.com/docs/scroll-margin
1979
2086
  #
1980
2087
  "scroll-me" => [{ "scroll-me" => SCALE_UNAMBIGUOUS_SPACING.call }],
2088
+ #
2089
+ # Scroll Margin Block Start
2090
+ # @see https://tailwindcss.com/docs/scroll-margin
2091
+ #
2092
+ "scroll-mbs" => [{ "scroll-mbs" => SCALE_UNAMBIGUOUS_SPACING.call }],
2093
+ #
2094
+ # Scroll Margin Block End
2095
+ # @see https://tailwindcss.com/docs/scroll-margin
2096
+ #
2097
+ "scroll-mbe" => [{ "scroll-mbe" => SCALE_UNAMBIGUOUS_SPACING.call }],
1981
2098
  ##
1982
2099
  # Scroll Margin Top
1983
2100
  # @see https://tailwindcss.com/docs/scroll-margin
@@ -2023,6 +2140,16 @@ module TailwindMerge
2023
2140
  # @see https://tailwindcss.com/docs/scroll-padding
2024
2141
  #
2025
2142
  "scroll-pe" => [{ "scroll-pe" => SCALE_UNAMBIGUOUS_SPACING.call }],
2143
+ #
2144
+ # Scroll Padding Block Start
2145
+ # @see https://tailwindcss.com/docs/scroll-padding
2146
+ #
2147
+ "scroll-pbs" => [{ "scroll-pbs" => SCALE_UNAMBIGUOUS_SPACING.call }],
2148
+ #
2149
+ # Scroll Padding Block End
2150
+ # @see https://tailwindcss.com/docs/scroll-padding
2151
+ #
2152
+ "scroll-pbe" => [{ "scroll-pbe" => SCALE_UNAMBIGUOUS_SPACING.call }],
2026
2153
  ##
2027
2154
  # Scroll Padding Top
2028
2155
  # @see https://tailwindcss.com/docs/scroll-padding
@@ -2141,15 +2268,15 @@ module TailwindMerge
2141
2268
  conflicting_class_groups: {
2142
2269
  "overflow" => ["overflow-x", "overflow-y"],
2143
2270
  "overscroll" => ["overscroll-x", "overscroll-y"],
2144
- "inset" => ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2271
+ "inset" => ["inset-x", "inset-y", "start", "end", "inset-bs", "inset-be", "top", "right", "bottom", "left"],
2145
2272
  "inset-x" => ["right", "left"],
2146
2273
  "inset-y" => ["top", "bottom"],
2147
2274
  "flex" => ["basis", "grow", "shrink"],
2148
2275
  "gap" => ["gap-x", "gap-y"],
2149
- "p" => ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2276
+ "p" => ["px", "py", "ps", "pe", "pbs", "pbe", "pt", "pr", "pb", "pl"],
2150
2277
  "px" => ["pr", "pl"],
2151
2278
  "py" => ["pt", "pb"],
2152
- "m" => ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2279
+ "m" => ["mx", "my", "ms", "me", "mbs", "mbe", "mt", "mr", "mb", "ml"],
2153
2280
  "mx" => ["mr", "ml"],
2154
2281
  "my" => ["mt", "mb"],
2155
2282
  "size" => ["w", "h"],
@@ -2195,6 +2322,8 @@ module TailwindMerge
2195
2322
  "border-w-y",
2196
2323
  "border-w-s",
2197
2324
  "border-w-e",
2325
+ "border-w-bs",
2326
+ "border-w-be",
2198
2327
  "border-w-t",
2199
2328
  "border-w-r",
2200
2329
  "border-w-b",
@@ -2207,6 +2336,8 @@ module TailwindMerge
2207
2336
  "border-color-y",
2208
2337
  "border-color-s",
2209
2338
  "border-color-e",
2339
+ "border-color-bs",
2340
+ "border-color-be",
2210
2341
  "border-color-t",
2211
2342
  "border-color-r",
2212
2343
  "border-color-b",
@@ -2221,6 +2352,8 @@ module TailwindMerge
2221
2352
  "scroll-my",
2222
2353
  "scroll-ms",
2223
2354
  "scroll-me",
2355
+ "scroll-mbs",
2356
+ "scroll-mbe",
2224
2357
  "scroll-mt",
2225
2358
  "scroll-mr",
2226
2359
  "scroll-mb",
@@ -2233,6 +2366,8 @@ module TailwindMerge
2233
2366
  "scroll-py",
2234
2367
  "scroll-ps",
2235
2368
  "scroll-pe",
2369
+ "scroll-pbs",
2370
+ "scroll-pbe",
2236
2371
  "scroll-pt",
2237
2372
  "scroll-pr",
2238
2373
  "scroll-pb",
@@ -34,7 +34,7 @@ module TailwindMerge
34
34
 
35
35
  ARBITRARY_VALUE_REGEX = /^\[(?:(\w[\w-]*):)?(.+)\]$/i
36
36
  ARBITRARY_VARIABLE_REGEX = /^\((?:(\w[\w-]*):)?(.+)\)$/i
37
- FRACTION_REGEX = %r{^\d+/\d+$}
37
+ FRACTION_REGEX = %r{^\d+(?:\.\d+)?/\d+(?:\.\d+)?$}
38
38
  TSHIRT_UNIT_REGEX = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
39
39
  LENGTH_UNIT_REGEX = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/
40
40
  COLOR_FUNCTION_REGEX = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TailwindMerge
4
- VERSION = "1.3.3"
4
+ VERSION = "1.4.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwind_merge
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
@@ -73,15 +73,15 @@ files:
73
73
  - lib/tailwind_merge/version.rb
74
74
  - script/test
75
75
  - tailwind_merge.gemspec
76
- homepage: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.3
76
+ homepage: https://github.com/gjtorikian/tailwind_merge/tree/v1.4.0
77
77
  licenses:
78
78
  - MIT
79
79
  metadata:
80
- homepage_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.3
81
- source_code_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.3
82
- changelog_uri: https://github.com/gjtorikian/tailwind_merge/blob/v1.3.3/CHANGELOG.md
80
+ homepage_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.4.0
81
+ source_code_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.4.0
82
+ changelog_uri: https://github.com/gjtorikian/tailwind_merge/blob/v1.4.0/CHANGELOG.md
83
83
  bug_tracker_uri: https://github.com/gjtorikian/tailwind_merge/issues
84
- documentation_uri: https://rubydoc.info/gems/tailwind_merge/1.3.3
84
+ documentation_uri: https://rubydoc.info/gems/tailwind_merge/1.4.0
85
85
  funding_uri: https://github.com/sponsors/gjtorikian
86
86
  rubygems_mfa_required: 'true'
87
87
  rdoc_options: []