[v4] custom-variant issue in Tailwind CSS with prefix #17062
Answered
by
wongjn
reardestani
asked this question in
Help
-
I am using Tailwind CSS v4 and have added prefix and a custom variant. Please check this example: https://play.tailwindcss.com/5eHxv2nUUS?file=css I expected the active tab to have blue background with white text but it's not working as expected. |
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Mar 8, 2025
Replies: 1 comment 1 reply
-
Two things:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
reardestani
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two things:
tw:
is always first.:
) in your selector with a backslash (\
). Without escaping the colon, it is parsed by the browser as the:active
pseudo-class.https://play.tailwindcss.com/vHJrPXJt1C