chriseppstein/compass — Issue #653: alternating-raws-and-cols() should be able to affect rows without classes.
Author: topenpe
Created: 2011-12-20 12:34:26+00:00
State: open

With Compass 0.11.5,
alternating-raws-and-cols() mixin uses nth-child() selector only for	-level.
And
-level is specified by only class selector ('tr.odd' and 'tr.even').
So, rows without the classes cannot be changed their background-color automatically.
I think this should be fixed.

current code:
tr.odd {
td {
background-color: $odd-row-color;
&.even, &:nth-child(2n) {
background-color: $odd-row-color - $dark-intersection; } } }

fixed code is below:
tr {
&.odd, &:nth-child(2n+1) {
td {
background-color: $odd-row-color;
&.even, &:nth-child(2n) {
background-color: $odd-row-color - $dark-intersection; } } } }

(... and 'even' case)