Skip to content

feat(core): Add support for any-hover#38

Open
larowlan wants to merge 1 commit intosaulhardman:masterfrom
larowlan:support-any-hover
Open

feat(core): Add support for any-hover#38
larowlan wants to merge 1 commit intosaulhardman:masterfrom
larowlan:support-any-hover

Conversation

@larowlan
Copy link

Before Chrome 41, the implementation of @media (hover: hover) was buggy and reported (hover: none) on non-touch-based computers with a mouse/trackpad.

Switching to @media (any-hover: hover) bypasses the bug.

See https://issues.chromium.org/issues/40397980 and implementation notes on https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover

This allows support for replacing @media (hover: hover) with @media (any-hover: hover)

See https://developer.mozilla.org/en-US/docs/Web/CSS/@media/any-hover

@gslexie
Copy link

gslexie commented Feb 12, 2026

+1 for this.

@media (any-hover: hover) better supports mixed media devices. E.g, on my MS Surface tablet with a mouse plugged in, @media (hover: hover) blocks hover states which is very annoying, but any-hover does not.

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

Successfully merging this pull request may close these issues.

2 participants