Created
March 10, 2015 16:19
-
-
Save nickautomatic/87c78106f04e4e156932 to your computer and use it in GitHub Desktop.
Super-simple breakpoint 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
// Super simple mobile-first breakpoint mixin: | |
@mixin breakpoint($from) { | |
@media screen and (min-width: $from) { @content; } | |
} | |
// Example usage: | |
$small: 480px; | |
nav { | |
@include breakpoint($small) { | |
display: none; | |
} | |
} | |
// ...alternative usage (for, eg. one-off tweakpoints): | |
// cf. https://adactio.com/journal/6044 | |
nav { | |
@include breakpoint(480px) { | |
display: none; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment