Skip to content

Instantly share code, notes, and snippets.

@brettsnippets
Created November 26, 2013 06:13
Show Gist options
  • Select an option

  • Save brettsnippets/7654135 to your computer and use it in GitHub Desktop.

Select an option

Save brettsnippets/7654135 to your computer and use it in GitHub Desktop.
SASS - Media Query Mixin
// Named Media Query
@mixin breakpoint($point) {
@if $point == desktop {
@media (min-width: 1200px) { @content; }
}
@else if $point == tablet {
@media (min-width: 768px) and (max-width: 1024px) { @content; }
}
@else if $point == phone {
@media (max-width: 767px) { @content; }
}
@else if $point == small_phone {
@media (max-width: 480px) { @content; }
}
@else if $point == x_small_phone {
@media (max-width: 300px) { @content; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment