Replies: 1 comment
-
Hey @neg4n! 👋 Thanks for the nice words! ❤️ There is a limitation in tailwind-merge with arbitrary background-position: You need to use the label By the way, you don't need to put the classes into an array, neither in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys 👋🏻 Thanks for maintaining this amazing library 🚀 this is the first issue I've encountered so far and I'm not sure how to approach this 🙈 I've tried to modify my config accordingly to the docs but with no positive result of eliminating the problematic behavior
Thanks for help in advance!
The problem
When using arbitrary background-position values like
bg-[left_2em_bottom_9rem]
along with breakpoints utility classes and e.g. background-color some of the classes are getting removed (I'm not sure if only background-color is affected)Example:
(the last comment is a result of a function call)
To Reproduce
git clone https://github.com/neg4n/twmerge-bg-color-bug/
cd twmerge-bg-color-bug && pnpm run start
Expected behavior
The background-position classes to be merged correctly, as raw
clsx
does.(the last comment is a result of a function call)
Environment
Beta Was this translation helpful? Give feedback.
All reactions