Created
December 19, 2012 06:47
-
-
Save kazu69/4334902 to your computer and use it in GitHub Desktop.
ie8 is not support nth-child(n) and last-chilad psedo class. i create sass psedo class mixin.
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
@mixin psedo-class($attr, $prop, $elem, $n:2) { | |
$elems: ''; | |
@for $i from 1 through $n { | |
$elems: #{$elems} + #{$elem}; | |
@if $i == $n { | |
.lt-ie9 &:first-child #{$elems} { | |
#{$attr}: #{$prop}; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment