Skip to content

Instantly share code, notes, and snippets.

@carambula
Created November 2, 2012 21:56
Show Gist options
  • Select an option

  • Save carambula/4004580 to your computer and use it in GitHub Desktop.

Select an option

Save carambula/4004580 to your computer and use it in GitHub Desktop.
Manage blocks of responsive attributes more cleanly
@mixin responsive-block($breakpoint: null)
@if $breakpoint == wide
@media only screen and (min-width: 1280px)
@content
@if $breakpoint == ipad-landscape
@media only screen and (min-width: 1024px) and (max-width: 1124px)
@content
@if $breakpoint == ipad-portrait
@media only screen and (min-width: 768px) and (max-width: 1024px)
@content
@if $breakpoint == iphone-landscape
@media only screen and (min-width: 464px) and (max-width: 767px)
@content
@if $breakpoint == iphone-portrait
@media only screen and (max-width: 463px)
@content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment