Skip to content

Commit 24af0cc

Browse files
committedSep 18, 2011
Add CSS rules for odd/even colouring of rows
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.
1 parent 3658921 commit 24af0cc

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed
 

‎public/css/default.css

+13-2
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,23 @@ div.form-container fieldset label.required:before {
443443
padding: .5em;
444444
float: right;
445445
}
446-
.odd {
446+
fieldset > .field-container:nth-child(2n+1),
447+
form > table > tr:nth-child(2n+1),
448+
table#manage-overview-table > tr:nth-child(2n+1),
449+
div.form-container > table > tr:nth-child(2n+2),
450+
div.table-container > table > tr:nth-child(2n+2) {
447451
background-color: #d8d8d8;
448452
}
449-
.even {
453+
fieldset > .field-container:nth-child(2n),
454+
form > table > tr:nth-child(2n+2),
455+
table#manage-overview-table > tr:nth-child(2n),
456+
div.form-container > table > tr:nth-child(2n+3),
457+
div.table-container > table > tr:nth-child(2n+3) {
450458
background-color: #e8e8e8;
451459
}
460+
form > table > tr:last-child {
461+
background-color: white;
462+
}
452463
fieldset fieldset.field-container,
453464
div.field-container {
454465
position: relative;

0 commit comments

Comments
 (0)