Skip to content

Instantly share code, notes, and snippets.

@necolas
Last active August 29, 2015 13:56
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 necolas/8969492 to your computer and use it in GitHub Desktop.
Save necolas/8969492 to your computer and use it in GitHub Desktop.
Problem with extracting IE-specific CSS into separate stylesheet.
.a {
background: red;
}
.a {
background: linear-gradient(red, orange);
}
.b {
background: green;
}
<!DOCTYPE html>
<link rel="stylesheet" href="generated-main.css">
<!--[if IE < 10]><link rel="stylesheet" href="generated-ie-only.css"><![endif]-->
<div class="a b">
has GREEN background in non-ie
has RED background in IE because cascade resolution is different due to source order change
</div>
.a {
-ie-background: red;
background: linear-gradient(red, orange);
}
.b {
background: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment