Created
November 28, 2013 12:54
-
-
Save 0xjjpa/7691431 to your computer and use it in GitHub Desktop.
Media Query Sass Recipe
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
$break-small: 480px; | |
$break-large: 1024px; | |
@mixin media-query-for($device) { | |
@if $device == palm { | |
@media only screen and (max-width: $break-small) { @content; } | |
} | |
@else if $device == lap { | |
@media only screen and (min-width: $break-small + 1) and (max-width: $break-large - 1) { @content; } | |
} | |
@else if $device == lap-and-up { | |
@media only screen and (min-width: $break-small + 1) { @content; } | |
} | |
@else if $device == portable { | |
@media only screen and (max-width: $break-large - 1) { @content; } | |
} | |
@else if $device == desk { | |
@media only screen and (min-width: $break-large) { @content; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment