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.

Revisions

  1. stevemeisner created this gist Aug 8, 2013.
    26 changes: 26 additions & 0 deletions sass @mixins
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    // 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;
    }
    }
    }