tailwind-merge 2.0.0
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-imageandbackground-positionbeing merged incorrectly by @dcastil in https://github.com/dcastil/tailwind-merge/pull/300- Values for
background-positionandbackground-sizecan 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 https://github.com/dcastil/tailwind-merge/pull/279
- Make it possible to override elements with
extendTailwindMergeby @dcastil in https://github.com/dcastil/tailwind-merge/pull/294 - Separate validators better by @dcastil in https://github.com/dcastil/tailwind-merge/pull/292
- Make
conflictingClassGroupModifiersin config non-optional by @dcastil in https://github.com/dcastil/tailwind-merge/pull/291 - Move separator to config by @dcastil in https://github.com/dcastil/tailwind-merge/pull/290
- Remove
modulefield from package.json by @dcastil in https://github.com/dcastil/tailwind-merge/pull/289 - Remove deprecated exports by @dcastil in https://github.com/dcastil/tailwind-merge/pull/288
- Transpile lib to more modern JS by @dcastil in https://github.com/dcastil/tailwind-merge/pull/287
New Features
- Make types of available keys more strict and configurable through generics by @kachkaev in https://github.com/dcastil/tailwind-merge/pull/279
- Make it possible to override elements with
extendTailwindMergeby @dcastil in https://github.com/dcastil/tailwind-merge/pull/294 - Separate validators better by @dcastil in https://github.com/dcastil/tailwind-merge/pull/292
- Make
conflictingClassGroupModifiersin config non-optional by @dcastil in https://github.com/dcastil/tailwind-merge/pull/291 - Move separator to config by @dcastil in https://github.com/dcastil/tailwind-merge/pull/290
- Remove
modulefield from package.json by @dcastil in https://github.com/dcastil/tailwind-merge/pull/289 - Remove deprecated exports by @dcastil in https://github.com/dcastil/tailwind-merge/pull/288
- Transpile lib to more modern JS by @dcastil in https://github.com/dcastil/tailwind-merge/pull/287
- Add ES5 bundle by @dcastil in https://github.com/dcastil/tailwind-merge/pull/286
Bug Fixes
- Fix touch action classes overriding each other incorrectly by @dcastil in https://github.com/dcastil/tailwind-merge/pull/313
- Fix
background-imageandbackground-positionbeing merged incorrectly by @dcastil in https://github.com/dcastil/tailwind-merge/pull/300 - Fix number validators accidentally returning
truefor empty strings by @dcastil in https://github.com/dcastil/tailwind-merge/pull/295 - Rename lazy-initializaton.test.ts to lazy-initialization.test.ts by @CrutchTheClutch in https://github.com/dcastil/tailwind-merge/pull/284
Documentation
- Explain limitations of arbitrary values in
bg-sizeandbg-positionclass groups in docs by @dcastil in https://github.com/dcastil/tailwind-merge/pull/328
Full Changelog: https://github.com/dcastil/tailwind-merge/compare/v1.14.0...v2.0.0
Thanks to @quezlatch, @brandonmcconnell, @manavm1990 and @ErwinAI for sponsoring tailwind-merge! ❤️