Skip to content

Instantly share code, notes, and snippets.

@carolineschnapp
Created September 6, 2014 05:10
Show Gist options
  • Save carolineschnapp/66aee1dee81203dd464d to your computer and use it in GitHub Desktop.
Save carolineschnapp/66aee1dee81203dd464d to your computer and use it in GitHub Desktop.
Classes to show or hide elements based on the screen size.
@media (max-width: 479px) {
.show-on-desktop, .show-on-tablets, .hide-on-mobile { display: none; }
}
@media (min-width: 480px) and (max-width: 979px) {
.show-on-desktop, .hide-on-tablets, .show-on-mobile { display: none; }
}
@media (min-width: 980px) {
.hide-on-desktop, .show-on-tablets, .show-on-mobile { display: none; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment