Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Respond-to Mixin with .ie8 fallback
@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
You can’t perform that action at this time.