tailwind-merge 1.0.0
v1! 🎉
Overview
After being 5 months on v0 I think it's time to release a stable version of tailwind-merge. Tailwind v3 was released yesterday and it's no coincidence that I'm releasing tailwind-merge v1 today. I added full support for Tailwind v3 so you can update both at once.
There are no breaking changes in the tailwind-merge types and some breaking changes for a small number of users in the return values, so you should get through smoothly.
By the way, you can now sponsor this project. 😊
Breaking Changes
-
twMerge,extendTailwindMerge- Outline utilities from Tailwind v2 don't get merged anymore since they were replaced by outline width, outline style, outline offset and outline color in Tailwind v3 (https://github.com/dcastil/tailwind-merge/pull/63/commits/55ab167b7167519873c5dd4d258dc62212d1659a, https://github.com/dcastil/tailwind-merge/pull/63)
- The classes
overflow-ellipsisandoverflow-clipwill not get merged with classtruncateanymore, but the new Tailwind v3 classestext-ellipsisandtext-clipwill. (https://github.com/dcastil/tailwind-merge/pull/63/commits/65b03e48914ac5d7d52eea9ec178b204d30609c9, https://github.com/dcastil/tailwind-merge/pull/63) - The classes
decoration-sliceanddecoration-clonewon't get merged anymore andbox-decoration-slidenadbox-decoration-clonewill (https://github.com/dcastil/tailwind-merge/pull/63/commits/bfe2cc9bb221107fa0bf363cc325ddbb04677f43, https://github.com/dcastil/tailwind-merge/pull/63)
-
getDefaultConfig- Removed class group
outlinesince it was removed in Tailwind v3 (https://github.com/dcastil/tailwind-merge/pull/63/commits/55ab167b7167519873c5dd4d258dc62212d1659a, https://github.com/dcastil/tailwind-merge/pull/63) - Renamed class group
vertival-alignment(yes, the typo was in the code) tovertical-align(https://github.com/dcastil/tailwind-merge/pull/63/commits/1269ce68ae39807ceadbecc98c0929fdfdb446d0, https://github.com/dcastil/tailwind-merge/pull/63) - Renamed class groups
flex-basis,flex-growandflex-shrinktobasis,growandshrinkto stay consistent with Tailwind v3 (https://github.com/dcastil/tailwind-merge/pull/63/commits/e6d8912e47bf9a89346b9b0cc822fb2bff2af172, https://github.com/dcastil/tailwind-merge/pull/63)
- Removed class group
-
validatorsisCustomLengthandisCustomValuewere renamed toisArbitraryLengthandisArbitraryValueto be consistent with naming in Tailwind v3 documentation (https://github.com/dcastil/tailwind-merge/pull/63/commits/adc3c02c7f035069beec1c62777ec008172587ab, https://github.com/dcastil/tailwind-merge/pull/63)
New Features
- Add support for Tailwind v3 by @dcastil in https://github.com/dcastil/tailwind-merge/pull/63
- Support for all the new utility classes and variants in Tailwind v3.0.0
- Support for arbitrary properties like
[--my-var:20px] - Support for important modifiers in arbitrary properties like
![--my-very-important-var: 21px] - Support for new labels for classes with arbitrary value:
size,position,url,weightandfamily - New validators
isTshirtSize,isArbitrarySize,isArbitraryPosition,isArbitraryUrlandisArbitraryWeight, check them out in the documentation! (https://github.com/dcastil/tailwind-merge/pull/63/commits/fec2b18870f6806e602009632b52b9fe89ebfb83, https://github.com/dcastil/tailwind-merge/pull/63/commits/f8acd7ca5be6cc40ad4c1cbdee7522bbc44c7870, https://github.com/dcastil/tailwind-merge/pull/63)
Full Changelog: https://github.com/dcastil/tailwind-merge/compare/v0.9.0...v1.0.0