Skip to content

Instantly share code, notes, and snippets.

@yowainwright
Last active December 9, 2017 19:52
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 yowainwright/f41eb8e192a06a65e728ea94e9178ea9 to your computer and use it in GitHub Desktop.
Save yowainwright/f41eb8e192a06a65e728ea94e9178ea9 to your computer and use it in GitHub Desktop.
Useful IE Hack SCSS Mixins
// target IE 10 and 11 with a media query
@mixin support-ie-10-11 {
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@content
}
}
// hack for css styles for < ie 9 only
@mixin support-ie-9($property, $value) {
$property: #{$value + '\0/'};
}
// @include support-ie-9(color, grey);
// body { color: grey\0/; }
// For reference: http://www.paulirish.com/2009/browser-specific-css-hacks/
// hack for css styles for < ie 9 only
@mixin support-ie-8($property, $value) {
$proptery: #{$value + '\9'};
}
// @include support-ie-8(color, grey);
// body { color: grey\9; }
// For reference: http://www.paulirish.com/2009/browser-specific-css-hacks/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment