Skip to content

Instantly share code, notes, and snippets.

@kgmorales
Created October 17, 2016 23:26
Show Gist options
  • Save kgmorales/5c73d694bc11440e87dca1f10f1968bc to your computer and use it in GitHub Desktop.
Save kgmorales/5c73d694bc11440e87dca1f10f1968bc to your computer and use it in GitHub Desktop.
Bootstrap media query mixin
//media queries breakpoints
@mixin bp($class) {
@if $class == xs {
@media (max-width: 767px) { @content; }
}
@else if $class == sm {
@media (min-width: 768px) { @content; }
}
@else if $class == md {
@media (min-width: 992px) { @content; }
}
@else if $class == lg {
@media (min-width: 1200px) { @content; }
}
@else if $class == xlg {
@media (min-width: 1400px) { @content; }
}
@else {
@warn "Breakpoint mixin supports: xs, sm, md, lg";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment