Skip to content

Commit

Permalink
Add CSS rules for odd/even colouring of rows
Browse files Browse the repository at this point in the history
These rules cover 80-90% of all cases where 'odd' and 'even' classes
used to be applied. In the remaining 10-20% of cases the CSS classes
available on parent elements will need more precision.
  • Loading branch information
davidhicks committed Sep 18, 2011
1 parent 3658921 commit 24af0cc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions public/css/default.css
Expand Up @@ -443,12 +443,23 @@ div.form-container fieldset label.required:before {
padding: .5em;
float: right;
}
.odd {
fieldset > .field-container:nth-child(2n+1),
form > table > tr:nth-child(2n+1),
table#manage-overview-table > tr:nth-child(2n+1),
div.form-container > table > tr:nth-child(2n+2),
div.table-container > table > tr:nth-child(2n+2) {
background-color: #d8d8d8;
}
.even {
fieldset > .field-container:nth-child(2n),
form > table > tr:nth-child(2n+2),
table#manage-overview-table > tr:nth-child(2n),
div.form-container > table > tr:nth-child(2n+3),
div.table-container > table > tr:nth-child(2n+3) {
background-color: #e8e8e8;
}
form > table > tr:last-child {
background-color: white;
}
fieldset fieldset.field-container,
div.field-container {
position: relative;
Expand Down

0 comments on commit 24af0cc

Please sign in to comment.