Skip to content

Instantly share code, notes, and snippets.

@LucaRosaldi
Created November 22, 2012 09:00
Show Gist options
  • Save LucaRosaldi/4130090 to your computer and use it in GitHub Desktop.
Save LucaRosaldi/4130090 to your computer and use it in GitHub Desktop.
SASS: mixin breakpoint()
// http://css-tricks.com/media-queries-sass-3-2-and-codekit/
.page-wrap {
width: 75%;
@include breakpoint(papa-bear) { width: 60%; }
@include breakpoint(mama-bear) { width: 80%; }
@include breakpoint(baby-bear) { width: 95%; }
}
@mixin breakpoint($point) {
@if $point == desktop {
@media (max-width: 1600px) { @content; }
}
@if $point == tablet {
@media (max-width: 1024px) { @content; }
}
@else if $point == phone {
@media (max-width: 767px) { @content; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment