Skip to content

Instantly share code, notes, and snippets.

@yatil
Created November 1, 2012 09:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yatil/3992748 to your computer and use it in GitHub Desktop.
Save yatil/3992748 to your computer and use it in GitHub Desktop.
IE Mediaqueries
@mixin respond-to($media) {
@if $media == small {
@media only screen and (max-width: 699px) { @content; }
}
@else if $media == medium {
@if $oldIE {
@content;
} @else {
@media only screen and (min-width: 600px) { @content; }
}
}
@else if $media == large {
@if $oldIE {
@content;
} @else {
@media only screen and (min-width: 700px) { @content; }
}
}
@else if $media == larger {
@if $oldIE {
} @else {
@media only screen and (min-width: 1050px) { @content; }
}
}
@else if $media == evenlarger {
@if $oldIE {
} @else {
@media only screen and (min-width: 1250px) { @content; }
}
}
@else if $media == huge {
@if $oldIE {
} @else {
@media only screen and (min-width: 1400px) { @content; }
}
}
}
h2 {
padding: 5px 10px 5px 8px;
font-size: 18px;
@include respond-to(large) {
padding-top: 10px;
padding-bottom: 10px;
font-size: 24px;
}
}
@import "compass";
$oldIE: true;
@import "main";
<!--[if gte IE 9]> -->
<link rel="stylesheet" href="/css/style.css" />
<!-- <![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" href="/css/ie.css" />
<![endif]-->
@import "compass";
$oldIE: false;
@import "main";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment