Not overriding flex classes
mraballard opened this issue · 3 comments
mraballard commented
Describe the bug
console.log(twMerge('flex-1', 'flex-0')
results in flex-1 flex-0
To Reproduce
console.log(twMerge('flex-1', 'flex-0')
Expected behavior
Results in flex-0
- tailwind-merge version: [2.5.2]
- tailwindcss: ^3.4.11,
dcastil commented
Hey @mraballard! 👋
There is no flex-0
class in the default Tailwind CSS classes, that's why tailwind-merge doesn't remove it. Maybe you meant flex-none
? Here are all the default flex classes: https://tailwindcss.com/docs/flex
mraballard commented
thanks @dcastil... sorry to waste your time! i didn't realize this package only worked with the default classes.
dcastil commented
It works with the default classes out of the box, but you can configure it to support custom classes. You can find out more about this in the docs: https://github.com/dcastil/tailwind-merge/blob/v2.5.2/docs/configuration.md