v1.14.0
github-actions
released this
16 Jul 15:21
·
423 commits
to refs/heads/main
since this release
New Features
- Improve support for arbitrary values by @dcastil in #263
- 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.
- 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
Bug Fixes
- Fix
col-span-full
class missing in default config by @dcastil in #267 - Fix arbitrary value with no present length unit not being recognized by @dcastil in #263
Documentation
Full Changelog: v1.13.2...v1.14.0