Skip to content

Instantly share code, notes, and snippets.

@graste
Forked from micahgodbolt/_respond-to.scss
Created October 3, 2013 22:11
Show Gist options
  • Save graste/6817920 to your computer and use it in GitHub Desktop.
Save graste/6817920 to your computer and use it in GitHub Desktop.
@mixin respond-to($primary, $secondary:min-width) {
@if $secondary == max-width {
@media screen and (max-width: $primary - .001) { @content; }
}
@else if $secondary == min-width {
@media screen and (min-width: $primary) { @content; }
@if $primary == $large {
.ie8 &{
@content;
}
}
@if $primary == $medium {
.ie8 &{
@content;
}
}
}
@else {
@media screen and (min-width: $primary) and (max-width: $secondary - .001) { @content; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment