Skip to content

Instantly share code, notes, and snippets.

@nathggns
Created April 11, 2012 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathggns/2361408 to your computer and use it in GitHub Desktop.
Save nathggns/2361408 to your computer and use it in GitHub Desktop.
Respond To Media Query
@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