Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save blueridgemountains1/11263f88048731beb9765a9508078980 to your computer and use it in GitHub Desktop.
Save blueridgemountains1/11263f88048731beb9765a9508078980 to your computer and use it in GitHub Desktop.
Sync Media Queries with Javascript
/** Great way to sync media queries with your javascript: https://mobile.twitter.com/selbekk/status/975145895909117952 **/
body::before {
content: ‘small’,
display: none;
}
@media all and (min-width: 1000px) {
body::before {
content: ‘medium’;
}
}
@media all and (min-width: 1200px) {
body::before {
content: ‘large’;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment