Skip to content

Instantly share code, notes, and snippets.

@Androguide
Created March 19, 2014 13:39
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 Androguide/9641835 to your computer and use it in GitHub Desktop.
Save Androguide/9641835 to your computer and use it in GitHub Desktop.
Simple SASS mixin using the @content directive used as a short-hand for the standard bootstrap 3.x.x media-queries
@mixin responsify($target) {
@if $target == large {
@media screen and (min-width: 1200px) {
@content;
}
}
@if $target == medium {
@media screen and (min-width: 992px) and (max-width: 1200px) {
@content;
}
}
@if $target == small {
@media screen and (min-width: 768px) and (max-width: 992px) {
@content;
}
}
@if $target == mobile {
@media screen and (max-width: 768px) {
@content;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment