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: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–63Not supported
64+Supportedsince Dec 11, 2018
Current: 157Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27MobileChrome Android
18–40Not supported
41+Supportedsince Mar 11, 2015
Current: 155Firefox Android
4–63Not supported
64+Supportedsince Dec 11, 2018
Current: 157Safari iOS
1–8Not supported
9+Supportedsince Sep 16, 2015
Current: 27How 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.
Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (4). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| @media.any-hover | 41 | 16 | 64 | 9 | 41 | 64 | 9 |
| @media.any-pointer | 41 | 12 | 64 | 9 | 41 | 64 | 9 |
| @media.hover | 38 | 12 | 64 | 9 | 50 | 64 | 9 |
| @media.pointer | 41 | 12 | 64 | 9 | 50 | 64 | 9 |