Skip to content

Hover not working #16150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
raviinstaller opened this issue Feb 1, 2025 · 7 comments
Closed

Hover not working #16150

raviinstaller opened this issue Feb 1, 2025 · 7 comments

Comments

@raviinstaller
Copy link

raviinstaller commented Feb 1, 2025

What version of Tailwind CSS are you using?

v4.0.3

What build tool (or framework if it abstracts the build tool) are you using?

Next js 15

What version of Node.js are you using?

Node 20

What browser are you using?

Chrome

What operating system are you using?

Windows 11

Reproduction URL

https://tailwindcss.com/docs/hover-focus-and-other-states#hover-focus-and-active

Describe your issue

I was just tryin to use tailwindcss v4 for my new project but I noticed that hover: is not working, so, tried to check docs, but on the docs page itself hover is not working.

try hovering on the button in the attached link.

@wongjn
Copy link
Collaborator

wongjn commented Feb 1, 2025

Seems to be working for me. Consider checking your Chrome browser is sufficiently recent (111+).

@raviinstaller
Copy link
Author

my chrome browser version is: Version 132.0.6834.160

@adamwathan
Copy link
Member

Are you using a device with a touchscreen? It could be that your device doesn’t match the (hover: hover) media query and reports that touch is the primary method of interaction. What specific computer is it?

@raviinstaller
Copy link
Author

thnx @adamwathan ,

yes, I've asus z flow x 13, that's a touch laptop, & it went in tablet mode automatically, after shaking device. now its working.

thnx a lot man.

@duprayae179dpl
Copy link

I ran into a similar issue related to issue #16416 and posted a comment there you should check out. Seems related to all touchscreen devices including 2-in-1 laptops.

@davidfishlock
Copy link

davidfishlock commented Feb 11, 2025

Just FYI everyone there is a regression tracked on Chromium here.

https://issues.chromium.org/issues/394519480

Causing issues with hover: hover and pointer: fine media queries on devices like laptops with a touchscreen but also a mouse connected.

If you are using hoverOnlyWhenSupported in your tailwind config to avoid sticky touch states then this will impact you as it relies on those media queries specifically.

Would recommend considering removing hoverOnlyWhenSupported from your config for now until this is resolved in a future Chrome update, although given it has been set at P0 then shouldn't hopefully be too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants