Media queries with any-pointer
There's the media-feature pointer
to test the accuracy of the primary input device in media queries. But what if we're interested in general availability of a a coarse (i.e. touch screen) or fine (i.e. mouse) pointing device? We use the any-pointer
media feature!
button {
padding: 1rem 4ch;
}
@media (any-pointer: fine) {
button {
padding: 0.5rem 2ch;
}
}
This article has been published on on my blog. Here's a list of all articles if you're interested in this kind of stuff.
Feedback
If you have feedback, questions, or want to comment on this, please send me an e-mail or contact me through any other channel.