Forked from davidgilbertson/css-breakpoint-mixins.scss
Created
November 27, 2016 16:05
-
-
Save AdsonCicilioti/3bfc2756a5a06ab013831090a351661c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin breakpoint($range) { | |
| // Note that there is no "phone up" which is the same as no media query | |
| // and no "big-desktop-only" which is the same as "big desktop up" | |
| @if $range == phone-only { | |
| @media (max-width: 599px) { @content; } | |
| } @else if $range == tablet-portrait-up { | |
| @media (min-width: 600px) { @content; } | |
| } @else if $range == tablet-portait-only { | |
| @media (min-width: 600px) and (max-width: 899px) { @content; } | |
| } @else if $range == tablet-landscape-up { | |
| @media (min-width: 900px) { @content; } | |
| } @else if $range == tablet-landscape-only { | |
| @media (min-width: 900px) and (max-width: 1199px) { @content; } | |
| } @else if $range == desktop-up { | |
| @media (min-width: 1200px) { @content; } | |
| } @else if $range == desktop-only { | |
| @media (min-width: 1200px) and (max-width: 1799px) { @content; } | |
| } @else if $range == big-desktop-up { | |
| @media (min-width: 1800px) { @content; } | |
| } | |
| } | |
| // example usage | |
| .some-big-header { | |
| display: none; | |
| @include breakpoint(tablet-landscape-up) { | |
| display: block; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment