Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@glennyboy
Last active January 7, 2020 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glennyboy/ce8b2d8227ac7920ce14aeab142f69f0 to your computer and use it in GitHub Desktop.
Save glennyboy/ce8b2d8227ac7920ce14aeab142f69f0 to your computer and use it in GitHub Desktop.
CSS target all mobile devices
@media (pointer:coarse) {
/* custom css for "touch targets" */
}
@media (hover: none) {
/* custom css for devices where the primary input mechanism cannot hover at all or cannot conveniently hover
}
@media (hover:none), (hover:on-demand) {
/* custom css for "touch targets" */
}
/* credit: https://stackoverflow.com/questions/12469875/how-to-code-css-media-queries-targeting-all-mobile-devices-and-tablets/29307143 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment