Created
August 23, 2012 21:17
-
-
Save dcrec1/3441946 to your computer and use it in GitHub Desktop.
respond-to 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
$mediaPhone: 480px !default | |
$mediaTablet: 768px !default | |
$mediaDesktop: 980px !default | |
$mediaLarge: 1200px !default | |
=respond-to($media) | |
@if $media == phone | |
@media only screen and (max-width: $mediaPhone) | |
@content | |
@else if $media == tablet | |
@media only screen and (max-width: $mediaTablet - 1) | |
@content | |
@else if $media == portrait | |
@media only screen and (min-width: $mediaTablet) and (max-width: $mediaDesktop - 1) | |
@content | |
@else if $media == desktop | |
@media only screen and (min-width: $mediaDesktop) | |
@content | |
@else if $media == large | |
@media only screen and (min-width: $mediaLarge) | |
@content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!