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;
}
}
Published: December 14th, 2021
Tags: til,CSS
References: