coderef

Interaction media queriesBaseline · Widely available

The pointer, any-pointer, hover, and any-hover CSS media queries set styles based on the presence of pointing devices and their ability to hover over elements. For example, most smartphones match the (hover: none) and (pointer: coarse) media query.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Dec 11, 2018. Widely available since Jun 11, 2021.

Browser support

DesktopChrome
1–40Not supported
41+Supportedsince Mar 3, 2015
Current: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1–63Not supported
64+Supportedsince Dec 11, 2018
Current: 157
Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27
MobileChrome Android
18–40Not supported
41+Supportedsince Mar 11, 2015
Current: 155
Firefox Android
4–63Not supported
64+Supportedsince Dec 11, 2018
Current: 157
Safari iOS
1–8Not supported
9+Supportedsince Sep 16, 2015
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: any-hover.

Feature detection

There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
@media.any-hover411664941649
@media.any-pointer411264941649
@media.hover381264950649
@media.pointer411264950649