Skip to content

Instantly share code, notes, and snippets.

@heddn
Last active August 30, 2016 19:00
Show Gist options
  • Save heddn/0b8796e352d61a61524b7f9adc3b2edf to your computer and use it in GitHub Desktop.
Save heddn/0b8796e352d61a61524b7f9adc3b2edf to your computer and use it in GitHub Desktop.
Extra small devices (phones, less than 768px)
No media query since this is the default in Bootstrap.
Small devices (tablets, 768px and up)
@media (min-width: @screen-sm-min) { }
Medium devices (desktops, 992px and up)
@media (min-width: @screen-md-min) { }
Large devices (large desktops, 1200px and up)
@media (min-width: @screen-lg-min) { }
@media (max-width: @screen-xs-max) { }
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { }
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { }
@media (min-width: @screen-lg-min) { }
Extra small devices (portrait phones, less than 544px)
No media query since this is the default in Bootstrap
Small devices (landscape phones, 544px and up)
@media (min-width: 544px) { ... }
Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }
Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }
Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
@include media-breakpoint-up(xs) { ... }
@include media-breakpoint-up(sm) { ... }
@include media-breakpoint-up(md) { ... }
@include media-breakpoint-up(lg) { ... }
@include media-breakpoint-up(xl) { ... }
Example of use:
@include media-breakpoint-up(sm) {
.some-class { display: block; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment