Skip to content

Instantly share code, notes, and snippets.

@azz0r
Last active December 11, 2016 15:49
Show Gist options
  • Save azz0r/379c371f69dcfa221e76b5319d0df70d to your computer and use it in GitHub Desktop.
Save azz0r/379c371f69dcfa221e76b5319d0df70d to your computer and use it in GitHub Desktop.
$screen-sm-min: 768px;
$screen-xs-max: ($screen-sm-min - 1);
$screen-md-min: 992px;
$screen-sm-max: ($screen-md-min - 1);
$screen-lg-min: 1200px;
$screen-md-max: ($screen-lg-min - 1);
body {
@media (min-width: $screen-sm-min) {
background-color: blue;
}
// stretchy bit between tablet and desktop
@media (min-width: $screen-md-min) {
background-color: red;
}
// essentially desktop
@media (min-width: $screen-lg-min) {
background-color: pink;
}
// desktop first rules
@media (max-width: $screen-sm-max) {
background-color: green;
}
// desktop first: tablet
@media (max-width: $screen-sm-max) {
background-color: yellow;
}
// desktop first: mobile
@media (max-width: $screen-xs-max) {
background-color: black;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment