Created
August 23, 2012 15:31
-
-
Save ganglio/3437768 to your computer and use it in GitHub Desktop.
SCSS: Media Queries
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
// Using em for media queries 1em=16px | |
$break-small: 30em; | |
$break-large: 64em; | |
$debug: FALSE; | |
@mixin respond-to($media) { | |
@if $media == handhelds { | |
@media all and (max-width: $break-small) { | |
@if $debug == TRUE { | |
html, body {background-color: #ff0000;} | |
} | |
@content; | |
} | |
} | |
@else if $media == medium-screens { | |
@media all and (min-width: $break-small) and (max-width: $break-large) { | |
@if $debug == TRUE { | |
html, body {background-color: #0000ff;} | |
} | |
@content; | |
} | |
} | |
@else if $media == wide-screens { | |
@media all and (min-width: $break-large) { | |
@if $debug == TRUE { | |
html, body {background-color: #ff0000;} | |
} | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment