Template:Table Alternance/Style.css

From Wikimedia Commons, the free media repository
Revision as of 10:16, 27 October 2023 by Esby (talk | contribs) (Esby moved page Template:Deceased contributors/style.css to Template:Table Alternance/Style.css without leaving a redirect: new implicit name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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;
}