Skip to content

twMerge is removing custom classes wrongly #276

@sumanthyedoti

Description

@sumanthyedoti
  • I have text-40 defined is tailwind config as 2.5rem
  • Had the class by default to a button
  • twMerge is removing the classes. I had to pass the classes explicitly, Button className="text-40",
    • 👉 then other custom class text-white-light got removed

Are the custom classes conflicting because they start with text-?

Note: I am using classnames library
config:

theme: {
  expand: {
      fontSize: {
        //...
        '40': '2.5rem',
      },
  }
}

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