Skip to content

Instantly share code, notes, and snippets.

@sarahmonster
Last active November 8, 2016 18:05
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 sarahmonster/f1fe98242359da357de98f1cb18908ac to your computer and use it in GitHub Desktop.
Save sarahmonster/f1fe98242359da357de98f1cb18908ac to your computer and use it in GitHub Desktop.
Boilerplate breakpoints mixins.
@mixin mobile {
@media (max-width: #{$size__tablet-width - 1px}) {
@content;
}
}
@mixin tablet {
@media (min-width: #{$size__tablet-width}) {
@content;
}
}
@mixin tablet-only {
@media (min-width: #{$size__tablet-width}) and (max-width: #{$size__desktop-width - 1px}) {
@content;
}
}
@mixin desktop {
@media (min-width: #{$size__desktop-width}) {
@content;
}
}
@mixin desktop-max {
@media (max-width: #{$size__desktop-width - 1px}) {
@content;
}
}
@mixin portrait {
@media (orientation : portrait) {
@content;
}
}
$size__tablet-width: 640px;
$size__desktop-width: 1024px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment