Template:Table Alternance/Style.css

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
/* Classes that allows to alternate the color in table 
according to the number of line
   * .alternance if odd ou .alternance2 if even
   * .sortable : sortable table needs to inverse the alternance. */
     .alternance,
.alternance2 {
	border-collapse: collapse;
}
table.alternance > * > tr > th, table.alternance2 > * > tr > th {
	background-color: #cccccc;
}
.alternance tr,
.alternance th[scope="row"] {
	background-color: #e6e6e6;
}
.alternance:not(.sortable) tr:nth-child(odd),
.alternance.sortable tr:nth-child(even),
.alternance:not(.sortable) tr:nth-child(odd) th[scope="row"],
.alternance.sortable tr:nth-child(even) th[scope="row"] {
	background-color: #cccccc;
}
.alternance2 tr,
.alternance2 th[scope="row"] {
	background-color: #cccccc;
}
.alternance2 tr:nth-child(odd),
.alternance2 tr:nth-child(odd) th[scope="row"] {
	background-color: #e6e6e6;
}