Skip to content

Instantly share code, notes, and snippets.

@akemrir
Created February 17, 2015 08:27
Show Gist options
  • Save akemrir/8716e81b1b749c410fef to your computer and use it in GitHub Desktop.
Save akemrir/8716e81b1b749c410fef to your computer and use it in GitHub Desktop.

Revisions

  1. Karol created this gist Feb 17, 2015.
    21 changes: 21 additions & 0 deletions gistfile1.sass
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    @import "bootstrap/variables"

    =respond-to($media)
    @if $media == xs
    @media (max-width: $screen-xs-max)
    @content
    @else if $media == sm
    @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max)
    @content
    @else if $media == md
    @media (min-width: $screen-md-min) and (max-width: $screen-md-max)
    @content
    @else if $media == lg
    @media (min-width: $screen-lg-min)
    @content
    @else if $media == x2
    @media only screen and (-Webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5)
    @content
    // @media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 13/10), only screen and (min-resolution: 120dpi)
    @else
    @error "zły typ media #{$media}"