Skip to content

Tailwind v4.0.14 hover: is not working even on a simple button #17225

Answered by Reconfort
AskatAsh asked this question in Help
Discussion options

You must be logged in to vote

I found solution in the https://tailwindcss.com/docs/upgrade-guide
"In v4 Tailwind team updated the hover variant to only apply when the primary input device supports hover:"

If laptop is touch screen and v4 "thinks" it doesn't have the ability to hover... the solution they propose is to add to the main css file:

"@custom-variant hover (&:hover);"

it can for try it.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@AskatAsh
Comment options

@wongjn
Comment options

wongjn Mar 15, 2025
Collaborator

@AskatAsh
Comment options

Comment options

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

Answer selected by AskatAsh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants