Skip to content

How to extend twMerge properly for font-weight and font-family #226

Discussion options

You must be logged in to vote

Hey @mohamedGamalAbuGalala! 👋

There is a guide for this here: https://github.com/dcastil/tailwind-merge/blob/v1.12.0/docs/recipes.md#adding-custom-scale-from-tailwind-config-to-tailwind-merge-config

For your specific Tailwind config this would be tailwind-merge config:

const twMerge = extendTailwindMerge({
    classGroups: {
        'font-weight': ['font-max'],
        // screens don't need to be configured in tailwind-merge
        // custom font families are supported out of the box and don't need to be configured
        // custom colors are supported out of the box and don't need to be configured
        // custom line heights with numerical values work out of the box
        'max-w': [

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mohamedGamalAbuGalala
Comment options

@dcastil
Comment options

@mohamedGamalAbuGalala
Comment options

@brandonmcconnell
Comment options

@dcastil
Comment options

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