Skip to content

Instantly share code, notes, and snippets.

@andeersg
Created October 28, 2013 11:50
Show Gist options
  • Save andeersg/7195514 to your computer and use it in GitHub Desktop.
Save andeersg/7195514 to your computer and use it in GitHub Desktop.
Sass mediaquery mixin
@mixin breakpoint($point) {
@if $point == desktop {
// Larger than tablets.
@media (min-width: 1210px) { @content; }
}
@else if $point == tablet {
// Tablets, go from 4 to 2 and 2 to 1.
@media (max-width: 1209px) { @content; }
}
@else if $point == mobile {
// Mobile, 1 everywhere!
@media (max-width: 719px) { @content; }
}
@else if $point == tablet-plus {
@media (min-width: 720px) { @content; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment