Permalink
Browse files

IE8 compat for :last-child selector

  • Loading branch information...
jdsiegel committed Oct 29, 2010
1 parent 8a59e34 commit c1fb764dba9c54cc5d02f2f7de213fb21ac6ca09
@@ -31,6 +31,9 @@
//
// :last-child is not fully supported
// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
//
// Setting `$padding` to `false` disables the padding between list elements
@mixin horizontal-list-item($padding: 4px, $direction: left) {
@@ -43,7 +46,8 @@
right: $padding;
}
&:first-child, &.first { padding-#{$direction}: 0; }
&:last-child, &.last { padding-#{opposite-position($direction)}: 0; }
&:last-child { padding-#{opposite-position($direction)}: 0; }
&.last { padding-#{opposite-position($direction)}: 0; }
}
}
@@ -17,12 +17,18 @@
//
// `:last-child` is not fully supported.
// see quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t29).
//
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
@mixin comma-delimited-list {
@include inline-list;
li {
&:after { content: ", "; }
&:last-child, &.last {
&:last-child {
&:after { content: ""; }
}
&.last {
&:after { content: ""; }
}
}
@@ -20,8 +20,14 @@
&:last-child,
&.last {
border-right-width: 0px; } }
// IE8 ignores rules that are included on the same line as :last-child
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
tbody, tfoot {
tr:last-child,
tr:last-child {
th, td {
border-bottom-width: 0px; } }
tr.last {
th, td {
border-bottom-width: 0px; } } } }

0 comments on commit c1fb764

Please sign in to comment.