Skip to content

Merging Sizes #160

Closed Answered by dcastil
SankarMS asked this question in Help
Discussion options

You must be logged in to vote

Hey @SankarMS! 👋

Tailwind CSS doesn't support T-shirt sizes for min-width classes out of the box. In case you added those sizes to your tailwind.config.js, then you can add them to tailwind-merge by adding them to the min-w class group like this:

const customTwMerge = extendTailwindMerge({
  classGroups: {
    'min-w': [{ 'min-w': ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', '7xl'] }],
  },
})

// or

const customTwMerge = extendTailwindMerge({
  classGroups: {
    'min-w': [{ 'min-w': [validators.isTshirtSize] }],
  },
})

Hope that helps 😊

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SankarMS
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
2 participants