Releases: dcastil/tailwind-merge
Releases · dcastil/tailwind-merge
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! ❤️
v1.5.1
v1.5.0
New Features
- Added missing ESM
types
subpath export condition by @scott-lc in #113- This makes tailwind-merge work in TypeScript projects using the new
nodenext
module type introduced in TypeScript 4.7.
- This makes tailwind-merge work in TypeScript projects using the new
Full Changelog: v1.4.0...v1.5.0
Thanks to @charkour for sponsoring tailwind-merge! ❤️
v1.4.0
New Features
Bug Fixes
Other
Full Changelog: v1.3.0...v1.4.0
Thanks to @charkour for sponsoring tailwind-merge! ❤️
v1.3.0
v1.2.1
Bug Fixes
- Fix isArbitraryWeight incorrectly using
weight:
instead ofnumber:
for disambiguation for arbitrary values by @liuqiang1357 in #85 - Fix typos in README.md by @Gri-ffin in #82
Full Changelog: v1.2.0...v1.2.1
Thanks to @charkour for sponsoring tailwind-merge! ❤️