Skip to content

Instantly share code, notes, and snippets.

@buzzedword
Last active August 29, 2015 14:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buzzedword/aa0064d66732b1ee586e to your computer and use it in GitHub Desktop.
Save buzzedword/aa0064d66732b1ee586e to your computer and use it in GitHub Desktop.
Bootstrap default media queries
@mixin breakpoint($point) {
@if $point == large {
@media (min-width: 1200px) { @content; }
}
@else if $point == medium {
@media (min-width: 992px) and (max-width: 1119px) { @content; }
}
@else if $point == small {
@media (min-width: 768px) and (max-width: 991px) { @content; }
}
@else if $point == xsmall {
@media (max-width: 767px) { @content; }
}
}
.breakpoint(@point, @content) when (@point = large) {
@media (min-width: 1200px) { @content; }
}
.breakpoint(@point, @content) when (@point = medium) {
@media (min-width: 992px) and (max-width: 1119px) { @content; }
}
.breakpoint(@point, @content) when (@point = small) {
@media (min-width: 768px) and (max-width: 991px) { @content; }
}
.breakpoint(@point, @content) when (@point = xsmall) {
@media (max-width: 767px) { @content; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment