v2.0.0
github-actions
released this
29 Oct 13:50
·
310 commits
to refs/heads/main
since this release
The tailwind-merge v2 release has been sitting here almost finished for 2 months already. But the timing was never quite right, especially thinking about the increased support needed after the release. In the meantime, the product of the company I work at launched in public beta and I married. Thank you for your patience.
This release focuses on making it easier to configure the library for new users. Check out the migration guide and if you have any questions, feel free to create an issue.
Breaking Changes
- Fix
background-image
andbackground-position
being merged incorrectly by @dcastil in #300- Values for
background-position
andbackground-size
can look very similar and Tailwind CSS uses the samebg-
prefix for both groups. This results in some limitations for tailwind-merge. If you use background position or background size with arbitrary values, please read this section about how to use them.
- Values for
- Make types of available keys more strict and configurable through generics by @kachkaev in #279
- Make it possible to override elements with
extendTailwindMerge
by @dcastil in #294 - Separate validators better by @dcastil in #292
- Make
conflictingClassGroupModifiers
in config non-optional by @dcastil in #291 - Move separator to config by @dcastil in #290
- Remove
module
field from package.json by @dcastil in #289 - Remove deprecated exports by @dcastil in #288
- Transpile lib to more modern JS by @dcastil in #287
New Features
- Make types of available keys more strict and configurable through generics by @kachkaev in #279
- Make it possible to override elements with
extendTailwindMerge
by @dcastil in #294 - Separate validators better by @dcastil in #292
- Make
conflictingClassGroupModifiers
in config non-optional by @dcastil in #291 - Move separator to config by @dcastil in #290
- Remove
module
field from package.json by @dcastil in #289 - Remove deprecated exports by @dcastil in #288
- Transpile lib to more modern JS by @dcastil in #287
- Add ES5 bundle by @dcastil in #286
Bug Fixes
- Fix touch action classes overriding each other incorrectly by @dcastil in #313
- Fix
background-image
andbackground-position
being merged incorrectly by @dcastil in #300 - Fix number validators accidentally returning
true
for empty strings by @dcastil in #295 - Rename lazy-initializaton.test.ts to lazy-initialization.test.ts by @CrutchTheClutch in #284
Documentation
- Explain limitations of arbitrary values in
bg-size
andbg-position
class groups in docs by @dcastil in #328
Full Changelog: v1.14.0...v2.0.0
Thanks to @quezlatch, @brandonmcconnell, @manavm1990 and @ErwinAI for sponsoring tailwind-merge! ❤️