Last active
October 2, 2020 13:50
-
-
Save tcrammond/99fd936007685dba97b7 to your computer and use it in GitHub Desktop.
A sass mixin to write css that targets only IE 10 and IE 11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thanks http://philipnewcomer.net/2014/04/target-internet-explorer-10-11-css/ | |
/* | |
Usage: | |
@include target-metro { | |
color: cyan; | |
} | |
*/ | |
@mixin target-metro { | |
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { | |
@content; | |
} | |
} |
@azzimuth Usually it's just best to target everything, then use the mixin above to remove the single case e.g.
body {
background: red;
@include target-metro {
background: green;
}
}
nice method thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I do opposite? A mixin for browsers except IE11?