[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:
parent
eb0470cd7e
commit
62174e1a21
@ -1,20 +1,20 @@
|
|||||||
@mixin alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color: white, $footer-color: white) {
|
@mixin alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color: white, $footer-color: white) {
|
||||||
th {
|
th {
|
||||||
background-color: $header-color;
|
background-color: $header-color;
|
||||||
&.even {
|
&.even, &:nth-child(2n) {
|
||||||
background-color: $header-color - $dark-intersection; } }
|
background-color: $header-color - $dark-intersection; } }
|
||||||
tr.odd {
|
tr.odd {
|
||||||
td {
|
td {
|
||||||
background-color: $odd-row-color;
|
background-color: $odd-row-color;
|
||||||
&.even {
|
&.even, &:nth-child(2n) {
|
||||||
background-color: $odd-row-color - $dark-intersection; } } }
|
background-color: $odd-row-color - $dark-intersection; } } }
|
||||||
tr.even {
|
tr.even {
|
||||||
td {
|
td {
|
||||||
background-color: $even-row-color;
|
background-color: $even-row-color;
|
||||||
&.even {
|
&.even, &:nth-child(2n) {
|
||||||
background-color: $even-row-color - $dark-intersection; } } }
|
background-color: $even-row-color - $dark-intersection; } } }
|
||||||
tfoot {
|
tfoot {
|
||||||
th, td {
|
th, td {
|
||||||
background-color: $footer-color;
|
background-color: $footer-color;
|
||||||
&.even {
|
&.even, &:nth-child(2n) {
|
||||||
background-color: $footer-color - $dark-intersection; } } } }
|
background-color: $footer-color - $dark-intersection; } } } }
|
||||||
|
Loading…
Reference in New Issue
Block a user