Skip to content

custom border widths not correctly merged #178

@christian-reichart

Description

@christian-reichart

Hey there,
first of all: great tool! Really digging it, it's super helpful! Thank you for developing this!

I found a bug that revolves around border-width, but this may also affect other classes.

I have defined custom border widths as such:

    borderWidth: {
      0: '0',
      DEFAULT: '3px',
      lg: '6px',
    },

Now when I use border-lg border-white in my twMerge, the border-lg get's stripped away. I think it's misinterpreting border-lg as a color variant.

Would be great if you could look into this.

It works with border border-white and also if I rename lg to a number, so e.g. border-6 border-white.

Metadata

Metadata

Assignees

No one assigned

    Labels

    context-v1Related to tailwind-merge v1

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions