Last active
August 29, 2015 14:01
-
-
Save TylerK/2d8685f64cd5477e80ad 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
// | |
// Mixin for inline responsive design | |
// | |
$smallScreen : 768px; | |
$mediumScreen : 992px; | |
$largeScreen : 1200px; | |
@function smallerThan($breakPoint) { | |
@return "screen and (min-width:" + $breakPoint + ")"; | |
} | |
@function largerThan($breakPoint) { | |
@return "(max-width:" + $breakPoint + ")"; | |
} | |
@mixin forScreen($size) { | |
@if $size == $smallScreen { | |
@media #{smallerThan($mediumScreen)} and #{largerThan($smallScreen)} { | |
@content; | |
} | |
} | |
@if $size == $mediumScreen { | |
@media #{smallerThan($mediumScreen)} { | |
@content; | |
} | |
} | |
@if $size == $largeScreen { | |
@media #{smallerThan($largeScreen)} { | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment