Created
March 27, 2015 12:17
-
-
Save bhalash/c0f15cb432b5cda2d301 to your computer and use it in GitHub Desktop.
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
@mixin breakpoint($point, $size: '') { | |
$cell_min: 200px; | |
$cell_max: 599px; | |
$tablet_min: 600px; | |
$tablet_max: 1024px; | |
@if $point == smartphone { | |
@media only screen and (min-device-width: $cell_min) and (max-device-width: $cell_max) and (orientation: portrait), | |
only screen and (min-device-width: $cell_min) and (max-device-width: $cell_max) and (orientation: landscape) { | |
@content; | |
} | |
} | |
@if $point == tablet { | |
@media only screen and (min-device-width: $tablet_min) and (max-device-width: $tablet_max) and (orientation: portrait), | |
only screen and (min-device-width: $tablet_min) and (max-device-width: $tablet_max) and (orientation: landscape) { | |
@content; | |
} | |
} | |
@if $point == portrait { | |
@media only screen and (orientation: portrait) { | |
@content; | |
} | |
} | |
@if $point == landscape { | |
@media only screen and (orientation: landscape) { | |
@content; | |
} | |
} | |
@if $point == max { | |
@media only screen and (max-width: $size + px) { | |
@content; | |
} | |
} | |
@if $point == min { | |
@media only screen and (min-width: $size + px) { | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment