@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

  1. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
  2. 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.
  3. Read Hover none query matches, Touch device identity established and interpret units, signs, ordering and placeholders as explained below.
  4. 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 fieldMeaningValue typeRequirement
primaryInputHoverCapabilityPrimary input hover capabilitystringRequired; constraints below
primaryInputPointerPrecisionPrimary input pointer precisionstringRequired; constraints below
callerAnyHoverAvailableCaller any hover availablebooleanRequired; 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 fieldMeaningValue type
hoverNoneQueryMatchesHover none query matchesboolean
touchDeviceIdentityEstablishedTouch device identity establishedboolean
json
{
  "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

  1. @media hover:none Touch Device Classifier — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies