Skip to content

Instantly share code, notes, and snippets.

@chriswrightdesign
Created November 5, 2013 23:04
Show Gist options
  • Save chriswrightdesign/7327967 to your computer and use it in GitHub Desktop.
Save chriswrightdesign/7327967 to your computer and use it in GitHub Desktop.
Attempting deal with old browsers like IE by making a flag for media query support and rendering out the content without the media queries.
//in the ie stylesheet - you just import the main stylesheet and flag $mediaQueries:false before import
$mediaQueries:true !default;
@mixin respond($width) {
@if $mediaQueries {
@if $width == "all" {
@media all {
@content;
}
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@else {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment