Skip to content

Commit

Permalink
Update to tailwind-merge 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
barvian committed Jul 7, 2024
1 parent 0b9542e commit a192244
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion packages/tailwind-merge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"prepublishOnly": "pnpm run build && pnpm run test"
},
"peerDependencies": {
"tailwind-merge": "^2.3.0"
"tailwind-merge": "~2.4.0"
},
"devDependencies": {
"bun": "^1.1.17",
Expand Down
11 changes: 9 additions & 2 deletions packages/tailwind-merge/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,15 @@ export function withFluid(config: Config<string, string>) {

return mergeConfigs(config, {
extend: {
classGroups,
ignoredVariants: [(variant) => variant.startsWith('~')]
classGroups
},
experimentalParseClassName({ className, parseClassName }) {
const parsed = parseClassName(className)

return {
...parsed,
modifiers: parsed.modifiers.filter((modifier) => !modifier.startsWith('~'))
}
}
})
}
27 changes: 5 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions site/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -367,5 +367,3 @@ import { withFluid } from '@fluid-tailwind/tailwind-merge'
export const twMerge = extendTailwindMerge(/* ... */, withFluid)
```

{/* <Tip.Warn>tailwind-merge currently doesn't merge the fluid variants (i.e. `~sm/lg:`, `~@sm/lg:`) correctly.</Tip.Warn> */}

0 comments on commit a192244

Please sign in to comment.