[Compass Core] Added a nth-child pseudo selector to the alternating-rows-and-columns mixin for the columns. Rows still need classes to maintain a consistent interaction across thead, tbody, and tfoot.

This commit is contained in:
Chris Eppstein 2010-04-30 09:39:21 -07:00
parent eb0470cd7e
commit 62174e1a21

View File

@ -1,20 +1,20 @@
@mixin alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color: white, $footer-color: white) {
th {
background-color: $header-color;
&.even {
&.even, &:nth-child(2n) {
background-color: $header-color - $dark-intersection; } }
tr.odd {
td {
background-color: $odd-row-color;
&.even {
&.even, &:nth-child(2n) {
background-color: $odd-row-color - $dark-intersection; } } }
tr.even {
td {
background-color: $even-row-color;
&.even {
&.even, &:nth-child(2n) {
background-color: $even-row-color - $dark-intersection; } } }
tfoot {
th, td {
background-color: $footer-color;
&.even {
&.even, &:nth-child(2n) {
background-color: $footer-color - $dark-intersection; } } } }