Created
April 11, 2012 18:59
-
-
Save nathggns/2361408 to your computer and use it in GitHub Desktop.
Respond To Media Query
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 respond-to($type, $m: max-width) { | |
@if $type == handheld { | |
@media screen and (max-width: 767px) { | |
@content; | |
} | |
} @else if $type == webkit { | |
@media screen and (-webkit-min-device-pixel-ratio: 0) { | |
@content; | |
} | |
} @else if $type == nonhandheld { | |
@media screen and (min-width: 769px) { | |
@content; | |
} | |
} @else { | |
@media screen and ($m: $type) { | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment