Created
August 10, 2016 19:34
-
-
Save moxdev/79f898792f260d9f93ad76a5d784b366 to your computer and use it in GitHub Desktop.
Mobile first Sass mixin for common breakpoints
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
// iPhone, min-width: 320px | |
// mobile, min-width: 480px | |
// tablet, min-width: 768px | |
// laptop, min-width: 992px | |
// desktop, min-width: 1200px | |
@mixin respond-to($breakpoint) { | |
@if $breakpoint == "iphone" { | |
@media (min-width: 320px) { | |
@content; | |
} | |
} | |
@else if $breakpoint == "mobile" { | |
@media (min-width: 480px) { | |
@content; | |
} | |
} | |
@else if $breakpoint == "tablet" { | |
@media (min-width: 768px) { | |
@content; | |
} | |
} | |
@else if $breakpoint == "laptop" { | |
@media (min-width: 992px) { | |
@content; | |
} | |
} | |
@else if $breakpoint == "desktop" { | |
@media (min-width: 1200px) { | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment