tailwind-merge
3.7.1 · 19 Nov 2026MIT118.2M / weekRepositorynpmAtom feed
In short
1 new2 fixed1 internal
Release note
New Features
Improve support for arbitrary values
Previously, tailwind-merge checked the content of the arbitrary value portion of a class in most cases to understand whether the type of the arbitrary value is correct (e.g. it checked for number followed by length unit for the length type). That lead to the issue that a class like
mt-[calc(theme(fontSize.4xl)/1.125)]would not be recognized correctly because no length unit is present in the arbitrary value.I changed the check of the arbitrary value to also pass when a
calc(),min(),max()andclamp()function is used in the arbitrary value.In ambiguous cases, you can use data type labels to mark the type of a class. Read more
Moreover, I removed the check where the type of the arbitrary value is unambiguous. In the class
mt-[…]the arbitrary value can only be a length, so I don't check for it. A consequence of this is that if you use non-Tailwind classes likemt-[this-is-totally-not-tailwind], tailwind-merge will recognize it as a Tailwind class from now on. Please don't use classes that look like Tailwind classes with arbitrary value but aren't Tailwind classes with tailwind-merge (in default config) to prevent incorrect merging behavior.
Bug Fixes
Fix
col-span-fullclass missing in default configFix arbitrary value with no present length unit not being recognized
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.