Skip to content

Instantly share code, notes, and snippets.

@TylerK
Created March 27, 2014 18:01
Show Gist options
  • Save TylerK/9814068 to your computer and use it in GitHub Desktop.
Save TylerK/9814068 to your computer and use it in GitHub Desktop.
A quick SASS mixin for putting your IE specific hacks in-line with your other styles.
//
// Note: For this to work you will need conditional classes on your html element. For more information:
// http://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
//
//
// Mixin
//
@mixin for-browser($browser) {
&.#{$browser} {
@content
}
}
//
// Usage
//
#divName {
display: block;
@include for-browser(ie8) {
display: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment