-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text-balance incompatibility #321
Comments
Hey @jamestrenda! 👋 The Here is an example on how to configure tailwind-merge: https://github.com/dcastil/tailwind-merge/blob/v1.14.0/docs/recipes.md#adding-custom-scale-from-tailwind-config-to-tailwind-merge-config. And here is the documentation on how the tailwind-merge configuration works: https://github.com/dcastil/tailwind-merge/blob/v1.14.0/docs/configuration.md#usage-with-custom-tailwind-config. For myself: |
I suspected that would be your response, and I completely understand your reasoning for that. Glad to know there is a viable solution in the meantime. I will take a look at those links when I have more time. Thank you very much. |
Not gonna lie, it is awesome that this issue was made not so long ago before I encountered this issue because after a long debugging session I understood that it was
Since the example is tackling a more complex property configuration it made it a bit more confusing for me, not sure if it would be a feature request per se, but it would be nice to have both examples in the docs, let me know if it makes sense and you agree with my opinion. I can add a feature request for it, and tackle it if that's ok. |
Could this be reopened now that |
Hey @skoshx! 👋 Just checked, but it is in the tailwind-merge config already. You can find it here: https://github.com/dcastil/tailwind-merge/blob/v2.3.0/src/lib/default-config.ts#L854 Are you sure that you're on the newest version? |
Wow this is embarassing, forgot to upgrade 💀 Thanks a lot for this! Can be closed :) |
Describe the bug
Using
text-balance
from the Tailwind Insiders package with a text color utility class, such astext-white
, results in only the last class being kept. If I dotext-balance text-white
, onlytext-white
is kept. If I dotext-white text-balance
, onlytext-balance
is kept. Unfortunately, these two classes do two different things and should, therefore, not conflict when merging.To Reproduce
npm install tailwindcss@insiders
and then try usingtwMerge('text-white text-balance')
Expected behavior
The two classes should not conflict with each other so that they're both added to the final output of
twMerge
Environment
The text was updated successfully, but these errors were encountered: