added test for alternating rows and columns

This commit is contained in:
Scott Davis 2012-01-02 00:32:46 -05:00
parent 0f0c92e1bb
commit dec5c9cb3b
3 changed files with 30 additions and 5 deletions

View File

@ -3,11 +3,13 @@
background-color: $header-color;
&.even, &:nth-child(2n) {
background-color: $header-color - $dark-intersection; } }
tr.odd {
tr {
&.odd, &:nth-child(2n+1) {
td {
background-color: $odd-row-color;
&.even, &:nth-child(2n) {
background-color: $odd-row-color - $dark-intersection; } } }
}
tr.even {
td {
background-color: $even-row-color;

View File

@ -34,3 +34,23 @@ p.light-with-args {
p.dark-with-args {
background-color: #5f1210;
color: blue; }
th {
background-color: white; }
th.even, th:nth-child(2n) {
background-color: yellow; }
tr.odd td, tr:nth-child(2n+1) td {
background-color: white; }
tr.odd td.even, tr.odd td:nth-child(2n), tr:nth-child(2n+1) td.even, tr:nth-child(2n+1) td:nth-child(2n) {
background-color: yellow; }
tr.even td {
background-color: red; }
tr.even td.even, tr.even td:nth-child(2n) {
background-color: red; }
tfoot th, tfoot td {
background-color: white; }
tfoot th.even, tfoot th:nth-child(2n), tfoot td.even, tfoot td:nth-child(2n) {
background-color: yellow; }

View File

@ -15,3 +15,6 @@ p.light { @include contrasted(#B0201E); }
p.dark { @include contrasted(#5F1210); }
p.light-with-args { @include contrasted(#B0201E, green, blue); }
p.dark-with-args { @include contrasted(#5F1210, green, blue); }
@include alternating-rows-and-columns(red, white, blue);