Last active
August 29, 2015 14:05
-
-
Save tomrishworth/9dc47886f17c6e091317 to your computer and use it in GitHub Desktop.
Media Query Mixin
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
// Media Query Variables | |
$XS: 580px; | |
$S: 768px; | |
$M: 992px; | |
$L: 1200px; | |
$XL: 1440px; | |
// Media Query Mixin | |
@mixin MQ($canvas){ | |
@if $canvas == XS{ | |
@media only screen and (min-width: $XS) { @content; } | |
} | |
@else if $canvas == S{ | |
@media only screen and (min-width: $S) { @content; } | |
} | |
@else if $canvas == Sneg{ | |
@media only screen and (max-width: $Sneg - 1) { @content; } | |
} | |
@else if $canvas == M{ | |
@media only screen and (min-width: $M) { @content; } | |
} | |
@else if $canvas == L{ | |
@media only screen and (min-width: $L) { @content; } | |
} | |
@else if $canvas == XL{ | |
@media only screen and (min-width: $XL) { @content; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment