You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backgrounds not merging properly on Tailwind v4 + tailwind-merge v3
To Reproduce
const before = "bg-black/15 bg-linear-to-b";
const after = twMerge(before);
console.log("before", before);
console.log("after", after);
I get
before bg-black/15 bg-linear-to-b
after bg-linear-to-b
Expected behavior
before bg-black/15 bg-linear-to-b
after bg-black/15 bg-linear-to-b
These two Tailwind classes can be used together. It worked when I was on Tailwind v3 + tailwinnd-merge v2, and it works when I manually add the class back.
In both cases I get back the string bg-black/15 bg-linear-to-b after merging. Is this the twMerge function exported from tailwind-merge or did you configure it with extendTailwindMerge?
Hey Dany, I resolved my issue by just deleting my node_modules folder and reinstalling everything. I guess it might have still been using the old version somehow, leading to my original issue. Everything is good now on my end, apologies if I wasted your time.
Describe the bug
Backgrounds not merging properly on Tailwind v4 + tailwind-merge v3
To Reproduce
I get
Expected behavior
These two Tailwind classes can be used together. It worked when I was on Tailwind v3 + tailwinnd-merge v2, and it works when I manually add the class back.
Environment
"tailwind-merge": "^3.0.1",
"tailwindcss": "^4.0.1",
The text was updated successfully, but these errors were encountered: