Created
April 24, 2019 15:40
-
-
Save harnerdesigns/a9c6509d60ca66972be71cfd9c2d1ff6 to your computer and use it in GitHub Desktop.
SASS Breakpoints Mixin
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
// Usage: | |
// @include breakpoint(desktop){ ... } | |
// | |
@mixin breakpoint($point) { | |
@if $point==desktop { | |
@media (min-width: 70em) { | |
@content ; | |
} | |
} | |
@else if $point==laptop { | |
@media (min-width: 64em) { | |
@content ; | |
} | |
} | |
@else if $point==tablet { | |
@media (min-width: 37.5em) { | |
@content ; | |
} | |
} | |
@else if $point==phablet { | |
@media (min-width: 37.5em) { | |
@content ; | |
} | |
} | |
@else if $point==mobileonly { | |
@media (max-width: 37.5em) { | |
@content ; | |
} | |
} | |
@else if $point==portrait { | |
@media (orientation: portrait) { | |
@content ; | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment