-
-
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
twMerge is removing custom classes wrongly #276
Comments
Hey @sumanthyedoti! 👋 tailwind-merge doesn't have access to the tailwind.config.js file and you need to configure it separately. The default out-of-the-box config of tailwind-merge assumes all unknown classes which could be a color are a color, this is why it de-duplicated 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. |
Thanks @dcastil |
Closing this issue. Please let me know if your issue isn't resolved and I should reopen it. |
text-40
defined is tailwind config as2.5rem
twMerge
is removing the classes. I had to pass the classes explicitly,Button className="text-40"
,text-white-light
got removedAre the custom classes conflicting because they start with
text-
?Note: I am using
classnames
libraryconfig:
The text was updated successfully, but these errors were encountered: