Skip to content

Instantly share code, notes, and snippets.

@nummi
Created October 16, 2012 20:51
Show Gist options
  • Select an option

  • Save nummi/3901926 to your computer and use it in GitHub Desktop.

Select an option

Save nummi/3901926 to your computer and use it in GitHub Desktop.
Media Query Sass
=respond-to($device)
@if $device == handheld
@media only screen and (min-width : 320px)
@content
@if $device == tablet
@media only screen and (min-width : 600px)
@content
@if $device == tablet-landscape
@media only screen and (min-width : 600px) and (orientation : landscape)
@content
@if $device == tablet-portrait
@media only screen and (min-width : 600px) and (orientation : portrait)
@content
@if $device == tablet-large
@media only screen and (min-width : 768px)
@content
@if $device == desktop
@media only screen and (min-width : 1024px)
@content
@if $device == desktop-large
@media only screen and (min-width : 1824px)
@content
@if $device == retina-display
@media only screen and (-webkit-min-device-pixel-ratio: 2)
@content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment