Skip to content

Instantly share code, notes, and snippets.

@vedranjaic
Last active January 12, 2017 07:37
Show Gist options
  • Save vedranjaic/8379588 to your computer and use it in GitHub Desktop.
Save vedranjaic/8379588 to your computer and use it in GitHub Desktop.
sass breakpoint mixin for media queries
// 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