Created
April 30, 2014 13:18
-
-
Save birkestroem/133f03eca808a244e9cd to your computer and use it in GitHub Desktop.
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
/** | |
* TODO: Optimize the MQ's logic to produce one statement. | |
*/ | |
@mixin breakpoint($point, $media: all) { | |
@if index($point, "xs") != null { | |
@media only #{$media} and (max-width: #{$screen-xs-max}) { | |
@content; | |
} | |
} | |
@if index($point, "sm") != null { | |
@media only #{$media} and (min-width: #{$screen-sm}) and (max-width: #{$screen-sm-max}) { | |
@content; | |
} | |
} | |
@if index($point, "md") != null { | |
@media only #{$media} and (min-width: #{$screen-md}) and (max-width: #{$screen-md-max}) { | |
@content; | |
} | |
} | |
@if index($point, "lg") != null { | |
@media only #{$media} and (min-width: #{$screen-lg}) { | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment