Skip to content

Instantly share code, notes, and snippets.

@nilesmc
Created November 28, 2016 19:08
Show Gist options
  • Select an option

  • Save nilesmc/4ef2cdede2192562a389034d6a12b2db to your computer and use it in GitHub Desktop.

Select an option

Save nilesmc/4ef2cdede2192562a389034d6a12b2db to your computer and use it in GitHub Desktop.
A set of declarative concise break points for my next Sass based project.
@mixin for-phone-only {
@media (max-width: 599px) { @content; }
}
@mixin for-tablet-portrait-up {
@media (min-width: 600px) { @content; }
}
@mixin for-tablet-portrait-only {
@media (min-width: 600px) and (max-width: 899px) { @content; }
}
@mixin for-tablet-landscape-up {
@media (min-width: 900px) { @content; }
}
@mixin for-tablet-landscape-only {
@media (min-width: 900px) and (max-width: 1199px) { @content; }
}
@mixin for-desktop-up {
@media (min-width: 1200px) { @content; }
}
@mixin for-desktop-only {
@media (min-width: 1200px) and (max-width: 1799px) { @content; }
}
@mixin for-big-desktop-up {
@media (min-width: 1800px) { @content; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment