Skip to content

Instantly share code, notes, and snippets.

@jhafner
Created July 12, 2013 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhafner/5985122 to your computer and use it in GitHub Desktop.
Save jhafner/5985122 to your computer and use it in GitHub Desktop.
Sass Media Query Mixin
// Mixin Function
@mixin breakpoint($point) {
@if $point == desktop {
@media (max-width: 1600px) { @content; }
}
@else if $point == tablet {
@media (max-width: 1250px) { @content; }
}
@else if $point == handheld {
@media (max-width: 650px) { @content; }
}
}
//Usage
.module {
width: 25%;
@include breakpoint(handheld) {
width: 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment