media-feature
Pointer — CSS reference
Tests primary pointing-device accuracy: none, coarse or fine. Accuracy is about the input mechanism rather than screen size. Keep controls usable regardless of the result.
Formal Syntax & Structure
css syntaxcss
@media (pointer: fine) { /* conditional declarations */ }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>pointer</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}@media (pointer: fine) {#a{color:rgb(0,100,0)}}</style><body><main id="a">Resize the viewport to explore this example.</main></body></html>