Created
April 7, 2018 05:14
-
-
Save isaacdanielanderson/a09cba1c569bbe067bf652682168c25b to your computer and use it in GitHub Desktop.
SASS BS4 Mixins
This file contains hidden or 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
@mixin breakpoint($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 { | |
@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
Example:
@media breakpoint(md) { text-align: left; }