Skip to content

Instantly share code, notes, and snippets.

@akemrir
Created February 17, 2015 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akemrir/8716e81b1b749c410fef to your computer and use it in GitHub Desktop.
Save akemrir/8716e81b1b749c410fef to your computer and use it in GitHub Desktop.
@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}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment