Skip to content

v1.14.0

Compare
Choose a tag to compare
@github-actions github-actions released this 16 Jul 15:21
· 359 commits to refs/heads/main since this release
788822b

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() and clamp() 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 like mt-[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-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

  • Add missing info about where to call config functions to docs by @dcastil in #264

Full Changelog: v1.13.2...v1.14.0