Last active
January 12, 2017 07:37
-
-
Save vedranjaic/8379588 to your computer and use it in GitHub Desktop.
sass breakpoint mixin for media queries
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
// Mixins | |
// http://css-tricks.com/media-queries-sass-3-2-and-codekit/ | |
@mixin breakpoint($point) { | |
@if $point == lg { | |
@media (min-width: 1200px) { @content; } | |
} | |
@else if $point == md { | |
@media (min-width: 992px) { @content; } | |
} | |
@else if $point == sm { | |
@media (min-width: 768px) { @content; } | |
} | |
} | |
// http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ | |
@mixin orientation($position) { | |
@if $position == landscape { | |
@media only screen and (orientation : landscape) { @content; } | |
} | |
@else if $position == portrait { | |
@media only screen and (orientation : portrait) { @content; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment