Skip to content

Instantly share code, notes, and snippets.

@hlb
Created July 25, 2013 03:07
Show Gist options
  • Save hlb/6076620 to your computer and use it in GitHub Desktop.
Save hlb/6076620 to your computer and use it in GitHub Desktop.
@mixin respond-to($media) {
@if $media == handhelds {
@media only screen and (max-width: 479px) { @content; }
}
@else if $media == wide-handhelds {
@media only screen and (min-width: 480px) and (max-width: 767px) { @content; }
}
@else if $media == tablets {
@media only screen and (min-width: 768px) and (max-width: 959px) { @content; }
}
}
#sidebar {
float: left;
width: 300px;
@include respond-to(handhelds) { float: none; }
@include respond-to(wide-handhelds) { float: none; }
@include respond-to(tablets) { width: 240px; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment