Difference and practicality of pointer vs. any-pointer media features

Viewed 37

The documentations on pointer and any-pointer read pretty similar, as testing whether the user has “a” or “any” pointing device doesn’t make a difference in the scope of this media feature, does it?

I tried the following CSS …

@media (pointer: fine) {body{background:green}}
@media (pointer: coarse) {body{background:red}}
⸻
@media (any-pointer: fine) {body{background:green}}
@media (any-pointer: coarse) {body{background:red}}

… both on a notebook with a connected mouse, and only with its touchpad, as well as a smartphone with only its touchscreen, and with a connected mouse.

In all scenarios, the desktop yielded “fine” (even with its coarse? touchpad) and the smartphone yielded “coarse” (even with a fine? mouse connected), whereas I anticipated:

  • any-pointer should have yielded fine on the smartphone with the mouse connected
  • pointer should have yielded coarse on the notebook with only the touchpad available

I hope I just don’t grasp it just yet, but otherwise … is it a bit quirky? Or what are practical scenarios for pointer/any-pointer respectively in regard to style usage and user hardware? (Why would one need both?)

0 Answers
Related