Skip to content

Extend config with new class name from plugin #322

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

You must be logged in to vote

Thanks for your patience @elbracht (have a packed week over here)!

The color classes available to tailwind-merge are configured in a way that they accept any values that don't belong to other classes, which makes their configuration a bit simpler.

E.g. I'd configure it like this:

import { extendTailwindMerge, validators } from 'tailwind-merge'

const twMerge = extendTailwindMerge({
    classGroups: {
        'inner-border-width': [{ 'inner-border': [/* my width values */] }],
        'inner-border-color': [{ 'inner-border': [validators.isAny] }]
    },
    // don't forget this since inner-border-width classes set a box-shadow
    conflictingClassGroups: {
        'inner-border-width': ['s…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@elbracht
Comment options

@dcastil
Comment options

Answer selected by elbracht
@elbracht
Comment options

@dcastil
Comment options

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