@media hover:none Touch Device Classifier
Primary hover:none capability does not identify a touch device; secondary any-hover may differ, no hardware label inferred. Explicit supplied computed/layout context only; not a browser cascade/layout engine or cross-browser guarantee.
Description
Hover and pointer media features describe input capabilities.
Hover and pointer media features describe input capabilities.1
A non-hovering primary input does not prove that a device is a touchscreen or lacks other input methods. Use @media hover:none Touch Device Classifier to evaluate the supplied inputs under the specific model below.
When to use @media hover:none Touch Device Classifier
Use @media hover:none Touch Device Classifier to evaluate the supplied inputs under the specific model below. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
How to use @media hover:none Touch Device Classifier and understand its results
- Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
- Enter Primary input hover capability, Primary input pointer precision, Caller any hover available using the field table and validation rules below, then run the tool.
- Read Hover none query matches, Touch device identity established and interpret units, signs, ordering and placeholders as explained below.
- If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| primaryInputHoverCapability | Primary input hover capability | string | Required; constraints below |
| primaryInputPointerPrecision | Primary input pointer precision | string | Required; constraints below |
| callerAnyHoverAvailable | Caller any hover available | boolean | Required; constraints below |
Enter supported primary hover and pointer tokens and the caller's any-hover boolean. The tool returns whether primary hover is none and always returns false for touchDeviceIdentityEstablished. The pointer token and any-hover flag are validated but do not influence those outputs. A media capability is insufficient to infer a touch-device identity.
primaryHoverNone = primaryHover==none; touchDeviceIdentityEstablished = false Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| hoverNoneQueryMatches | Hover none query matches | boolean |
| touchDeviceIdentityEstablished | Touch device identity established | boolean |
{
"input": {
"primaryInputHoverCapability": "none",
"primaryInputPointerPrecision": "coarse",
"callerAnyHoverAvailable": true
},
"output": {
"hoverNoneQueryMatches": true,
"touchDeviceIdentityEstablished": false
}
} Limitations and assumptions
A non-hovering primary input does not prove that a device is a touchscreen or lacks other input methods. Apply the exact scope and assumptions described above.
All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.
Alternative or Complementary methods
Use user-select:none Protection Lookup for a related task: User-select controls ordinary selection behavior.
Use pointer-events:none Hit-Test Bypass Note for a related task: Pointer targeting and keyboard focus are separate interaction mechanisms.
References
Similar or alternative tools
- user-select:none Protection Lookup
User-select controls ordinary selection behavior.
- pointer-events:none Hit-Test Bypass Note
Pointer targeting and keyboard focus are separate interaction mechanisms.