Last active
February 23, 2016 22:41
-
-
Save rosemarydotworld/05cecb9e95479ee0d626 to your computer and use it in GitHub Desktop.
This file contains 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
// Get the selector for a version of IE | |
@function getSelector($version) { | |
@if $version == 9 { | |
@return 'html.ie9 &'; | |
} @else if $version > 9 { | |
@return 'html[data-browser="ie#{$version}"]'; | |
} | |
} | |
// Write selectors for given space-separated IE versions | |
@mixin ie($versions) { | |
@each $version in $versions { | |
#{getSelector($version)} { | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment