Skip to content

Instantly share code, notes, and snippets.

@kazu69
Created December 19, 2012 06:47
Show Gist options
  • Save kazu69/4334902 to your computer and use it in GitHub Desktop.
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.
@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