Skip to content

Instantly share code, notes, and snippets.

@mattisfrommars
Created March 29, 2013 11:24
Show Gist options
  • Save mattisfrommars/5270294 to your computer and use it in GitHub Desktop.
Save mattisfrommars/5270294 to your computer and use it in GitHub Desktop.
Shorthand media query mixins, example usage: @include minwidth (280px) { body { background-color: green; } }
@mixin minwidth ($width) {
@media only screen and (min-width : $width ) {
@content;
}
}
@mixin maxwidth ($width) {
@media only screen and (max-width : $width ) {
@content;
}
}
@mixin minheight ($height) {
@media only screen and (min-height : $height ) {
@content;
}
}
@mixin maxheight ($height) {
@media only screen and (max-height : $height ) {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment