Skip to content

[V4] Custom classes not applying based on data attribute value #16862

Answered by wongjn
mikeploythai asked this question in Help
Discussion options

You must be logged in to vote

You'd need to use @utility so that Tailwind "knows" about the class names, like:

@utility btn {
  @layer components {
    @apply …;
  }
}

@utility btn-primary {
  @layer components {
    @apply …;
  }
}

@utility btn-seconday {
  @layer components {
    @apply …;
  }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mikeploythai
Comment options

Answer selected by mikeploythai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants