Releases: dcastil/tailwind-merge
Releases · dcastil/tailwind-merge
v1.10.0
New Features
- Add support for container query length units in arbitrary values by @LesnoyPudge in #204
Full Changelog: v1.9.1...v1.10.0
v1.9.1
Bug Fixes
- Fix arbitrary floats not supported in opacity, scale, etc. by @dcastil in #196
- Up until now classes like
opacity-50 opacity-[.025]
weren't merged correctly. You might not have noticed since classes with arbitrary values are defined after the default ones in the output stylesheet, but merging it the other way around (opacity-[.025] opacity-50
) would have led to a styling bug. - This fix led to a new validator
isNumber
.
- Up until now classes like
- Fix arbitrary border color value being merged incorrectly by @dcastil in #195
Full Changelog: v1.9.0...v1.9.1
v1.9.0
New Features
- Support decimals in T-shirt sizes by @farreldarian in #189
Documentation
- Fixes typo in recipes docs by @nicklemmon in #181
Other
- Added test case by @chuanyu0201 in #186
Full Changelog: v1.8.1...v1.9.0
v1.8.1
v1.8.0
New Features
- Add support for custom separator by @dcastil in #168
- Add support for dynamic viewport units in arbitrary lengths by @dcastil in #166
- Rename
join
totwJoin
by @dcastil in #161- I deprecated the
join
function and renamed it totwJoin
to make replacing it via search and replace easier sincejoin
is a common function name. You don't need to change anything right now, but if you have some spare time, rename join → twJoin in your code since thejoin
function will be removed in the next major release.
- I deprecated the
Full Changelog: v1.7.0...v1.8.0
Thanks to @gjtorikian for sponsoring tailwind-merge! ❤️
v1.7.0
New Features
- Add support for Tailwind CSS v3.2 by @dcastil and @brandonmcconnell in #159
Full Changelog: v1.6.2...v1.7.0
v1.6.2
Bug Fixes
- Fix arbitrary numbers not working in stroke-width by @dcastil in #153
- Now tailwind-merge handles classes like
stroke-[3]
correctly. - I deprecated the validator
isArbitraryWeight
and renamed it toisArbitraryNumber
to reflect its broader use case. You don't need to change anything right now, but if you have some spare time, renameisArbitraryWeight
→isArbitraryNumber
in your code sinceisArbitraryWeight
will be removed in the next major release.
- Now tailwind-merge handles classes like
Other
- Add package version number to dev releases by @dcastil in #154
- Now dev releases don't start with
0.0.0-dev
anymore and instead have the version number of the last release, like1.6.1-dev
. That makes it easier for tools like Renovate to understand which package version you're using in case you use dev releases.
- Now dev releases don't start with
Full Changelog: v1.6.1...v1.6.2
v1.6.1
v1.6.0
New Features
- Add support for arrays as argument by @dcastil in #127
- You can now use arbitrarily nested arrays as arguments to
twMerge
. That's especially handy for nested conditions.twMerge('…', someBool && ['…', anotherBool && '…'])
- The joining of arguments is done with a new
join
function which is present in the tailwind-merge exports as well. It has the same functionality as clsx but without support for objects as arguments which makes it a little faster. - Why no objects as arguments? You can read about my reasoning in https://github.com/dcastil/tailwind-merge/discussions/137#discussioncomment-3481605.
- You can now use arbitrarily nested arrays as arguments to
Bug Fixes
- Replace matchAll with exec by @dcastil in #133
- This makes tailwind-merge work in older browsers which don't support
String.prototype.matchAll()
- This makes tailwind-merge work in older browsers which don't support
Other
- Add recipes section to docs by @dcastil in #134
- Split docs into multiple files by @dcastil in #131
- Add comments to released PRs and their related issues by @dcastil in #130
- Add tests to check actual CJS and ESM package exports by @dcastil in #129
- Remove ts files from npm package by @dcastil in #128
Full Changelog: v1.5.1...v1.6.0
Thanks to @charkour for sponsoring tailwind-merge! ❤️