Skip to content

Variants do not override base styles #274

@alex-buena

Description

@alex-buena

Describe the bug
I you have a style in the base and then in the variants it does not get overridden. Only is u use !

To Reproduce

const buttonVariants = tv({
  base: 'ui:px-md ',
  variants: {
size: {
      xl: ['ui:px-lg'],
}
})

-> px will be md

Expected behavior
That variants are stronger then the base

Desktop (please complete the following information):

  • OS: Mac Os
  • Browser chrome]
  • Version [e.g. 22]
"tailwind-variants": "^3.1.1"
"tailwindcss": "^4.1.5",
"@tailwindcss/cli": "^4.1.5",

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions