Releases: dcastil/tailwind-merge
v1.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 (55ab167, #63)
- The classes
overflow-ellipsis
andoverflow-clip
will not get merged with classtruncate
anymore, but the new Tailwind v3 classestext-ellipsis
andtext-clip
will. (65b03e4, #63) - The classes
decoration-slice
anddecoration-clone
won't get merged anymore andbox-decoration-slide
nadbox-decoration-clone
will (bfe2cc9, #63)
-
getDefaultConfig
- Removed class group
outline
since it was removed in Tailwind v3 (55ab167, #63) - Renamed class group
vertival-alignment
(yes, the typo was in the code) tovertical-align
(1269ce6, #63) - Renamed class groups
flex-basis
,flex-grow
andflex-shrink
tobasis
,grow
andshrink
to stay consistent with Tailwind v3 (e6d8912, #63)
- Removed class group
-
validators
New Features
- Add support for Tailwind v3 by @dcastil in #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
,weight
andfamily
- New validators
isTshirtSize
,isArbitrarySize
,isArbitraryPosition
,isArbitraryUrl
andisArbitraryWeight
, check them out in the documentation! (fec2b18, f8acd7c, #63)
Full Changelog: v0.9.0...v1.0.0
v0.9.0
New Features
- Mimic theme from Tailwind config in tailwind-merge config by @dcastil in #55
- Adds support for some theme properties like
spacing
,borderRadius
, etc. More on that in the theme docs.
- Adds support for some theme properties like
Full Changelog: v0.8.2...v0.9.0
v0.8.2
Bug Fixes
Full Changelog: v0.8.1...v0.8.2
v0.8.1
Bug Fixes
- Fix missing support for custom values in some class groups in default config by @dcastil in #52
- Adds missing support for custom values in following class groups: Grid Auto Columns, Grid Auto Rows, Max-Width, Transition Property, Transition Timing Function, Animation, Fill, Stroke
Full Changelog: v0.8.0...v0.8.1
v0.8.0
Summary
This is a big release with breaking changes. These were necessary to improve the API before the coming v1.0.0 release and to add better plugin support. If you feel like writing a plugin, check out the plugins section in the docs!
Breaking Changes
- Previously there was a list of prefixes in the tailwind-merge config which was used to match Tailwind prefixes. I removed those and match all prefixes as valid Tailwind prefixes. This is only a breaking change if you use non-Tailwind classes with
:
in them which look like Tailwind classes after the prefix. tailwind-merge will treat those as Tailwind classes and resolve conflicts incorrectly. (#50) createTailwindMerge
- If you added custom prefixes to your tailwind-merge config, you can remove them now. If you use TypeScript, you need to remove them. (#50)
- Doesn't get passed the
getDefaultConfig
callback anymore. You need to call the exported functiongetDefaultConfig
instead to get the default config. (#42) - You probably don't need
createTailwindMerge
anyway. Use the new and much simpler to useextendTailwindMerge
instead. (#49)
New Features
- Add plugin documentation by @dcastil in #51
- (Breaking change) Consider all prefixes as valid Tailwind prefixes by @dcastil in #50
- Add
extendTailwindMerge
function by @dcastil in #49 - Add
mergeConfigs
function by @dcastil in #45 - (Breaking change) Code-split default config out by @dcastil in #42
- Enable multiple
createConfig
functions by @dcastil in #40 - Add validators to package exports by @dcastil in #38
Bug Fixes
- Remove unwated side effects when mutating default config by @dcastil in #43
- Also added the
Config
type to the package exports
- Also added the
Full Changelog: v0.7.1...v0.8.0
v0.7.1
Bug Fixes
- Fix CommonJS imports not working by @navin-moorthy and @dcastil in #31
Full Changelog: v0.7.0...v0.7.1