Last active
March 6, 2017 06:38
-
-
Save georgebyte/ca79c201580cebc1646d to your computer and use it in GitHub Desktop.
CSS, Sass: Flexible 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
//base font | |
$bf: 16; | |
@mixin bp($bp, $min-max: min-width) { | |
$em: $bp/$bf; | |
@media(#{$min-max}: #{$em}em) { @content; } | |
} | |
//including the mixin | |
.element { | |
@include bp(600) { | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment