Skip to content

Added a text-xxs font size to my tailwind.config but it overrides colors - how to fix? #489

Answered by dcastil
stevensacks asked this question in Help
Discussion options

You must be logged in to vote

Hey @stevensacks! 👋

tailwind-merge doesn't have access to the tailwind.config.js file and you need to configure it separately so it knows about the text-xxs class. But tailwind-merge will recognize it automatically if you use text-2xs or text-0.5xs (similar to the class text-2xl) in case you prefer that.

Here is an example on how to configure tailwind-merge: https://github.com/dcastil/tailwind-merge/blob/v2.5.4/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/v2.5.4/docs/configuration.md#usage-with-custom-tailwind-config.


(For myself)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stevensacks
Comment options

Answer selected by stevensacks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
context-v2 Related to tailwind-merge v2
2 participants