Skip to content

Instantly share code, notes, and snippets.

@stevemeisner
Created August 8, 2013 11:44
Show Gist options
  • Select an option

  • Save stevemeisner/6183922 to your computer and use it in GitHub Desktop.

Select an option

Save stevemeisner/6183922 to your computer and use it in GitHub Desktop.
Reusable SASS @Mixins.
// Reusable media query
@mixin maxWidth-x($maxWidth, $orientation:"") {
@if $orientation != "" {
@media only screen and (max-width : $maxWidth) and (orientation:$orientation) {
@content;
}
}
@if $orientation == "" {
@media only screen and (max-width : $maxWidth) {
@content;
}
}
}
@mixin maxDeviceWidth-x($maxWidth, $orientation:"") {
@if $orientation != "" {
@media only screen and (max-device-width : $maxWidth) and (orientation:$orientation) {
@content;
}
}
@if $orientation == "" {
@media only screen and (max-device-width : $maxWidth) {
@content;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment