Created
October 17, 2016 23:26
-
-
Save kgmorales/5c73d694bc11440e87dca1f10f1968bc to your computer and use it in GitHub Desktop.
Bootstrap media query mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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