Releases: dcastil/tailwind-merge
Releases · dcastil/tailwind-merge
v1.13.0
This release focuses on improvements to the docs.
Bug Fixes
- Fix arbitrary length
0
without unit not being recognized by @dcastil in #237 - Fix typo in comment in default-config.ts by @CrutchTheClutch in #227
Documentation
- Add intro video from Simon Vrachliotis to docs by @dcastil in #239
- @simonswiss made an intro video to tailwind-merge which I added to the docs. Check it out here!
- Add docs about when to use tailwind-merge by @dcastil in #230
- I added a new page to the docs about when and how to use tailwind-merge which should help you to decide whether you should use it and what alternative approaches exist.
- Make it clearer in docs that tailwind-merge supports composition of class strings by @dcastil in #229
Other
- Add npm package provenance by @dcastil in #219
- GitHub introduced a new security feature to verify which source commit and build file were used for a specific npm package version. tailwind-merge now publishes provenance signatures alongside all releases on npm. Read more on the GitHub blog.
Full Changelog: v1.12.0...v1.13.0
v1.12.0
With this release tailwind-merge supports all features introduced in Tailwind CSS v3.3.
New Features
- Add support for postfix modifier by @dcastil in #214
- This adds support for
line-height
modifiers infont-size
utilities liketext-lg/7
and more potential postfix modifiers in the future (learn more). - All classes are checked for postfix modifiers since there will be more in the future and they'll be configurable with plugins.
- tailwind-merge can't know from the class syntax alone whether something is a modifier or not. E.g. there is
w-1/2
which doesn't contain a modifier. So tailwind-merge always checks whether class without potential modifier exists and if it doesn't it checks for full class. This behavior might get reversed in the next major version as a breaking change (learn more). - Added
conflictingClassGroupModifiers
object to tailwind-merge config (learn more).
- This adds support for
Full Changelog: v1.11.0...v1.12.0
v1.11.0
New Features
- Add support for Tailwind CSS v3.3 except line-height shorthand by @dcastil in #210
- The line-height shorthand in font-size utilities (
text-lg/7
) introduced in Tailwind CSS v3.3 is not yet supported in tailwind-merge because that feature is a bit more involved. I'll add support for it in a future release. More info in #211. - Added new validator
isPercent
which is needed internally for the default scale of color stop positions. - New theme key
gradientColorStopPositions
supported in tailwind-merge. - New logical properties like
ps-0
(padding-inline-start: 0px;
) are de-duplicated away when using the matching property for all sides afterwards like in this casep-0
, but not when using single axis sides likepx-0
becausepadding-inline-start
can also be the top or bottom padding depending on writing mode.- Basically
twMerge('ps-0 p-0') === 'p-0' && twMerge('ps-0 px-0') === 'ps-0 px-0'
. - If you want to use logical properties and know which writing modes your app is limited to, add the right conflicts yourself to your tailwind-merge config.
- Basically
- The line-height shorthand in font-size utilities (
Full Changelog: v1.10.0...v1.11.0
Thanks to @brandonmcconnell for sponsoring 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