Skip to content

Instantly share code, notes, and snippets.

@sergeh
Created July 19, 2020 05:49
Show Gist options
  • Save sergeh/497e357e752ff900c0182252c898ef86 to your computer and use it in GitHub Desktop.
Save sergeh/497e357e752ff900c0182252c898ef86 to your computer and use it in GitHub Desktop.
Media queries for different types of devices
@media (hover: none) and (pointer: coarse) {
/* you're on a touch-only device */
}
@media (hover: none) and (pointer: fine) {
/* you're on a device without hover but with a stylus
or other fine pointing device */
}
@media (hover: hover) and (pointer: coarse) {
/* you're on a device with hover but a coarse pointer,
like a gamepad or wii remote*/
}
@media (hover: hover) and (pointer: fine) {
/* you're on a device with a mouse or trackpad */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment