Template:Table Alternance/Style.css: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
mNo edit summary |
mNo edit summary |
||
Line 18: | Line 18: | ||
.alternance:not(.sortable) tr:nth-child(odd) th[scope="row"], |
.alternance:not(.sortable) tr:nth-child(odd) th[scope="row"], |
||
.alternance.sortable tr:nth-child(even) th[scope="row"] { |
.alternance.sortable tr:nth-child(even) th[scope="row"] { |
||
background-color: # |
background-color: #cccccc; |
||
} |
} |
||
.alternance2 tr, |
.alternance2 tr, |
||
.alternance2 th[scope="row"] { |
.alternance2 th[scope="row"] { |
||
background-color: # |
background-color: #cccccc; |
||
} |
} |
||
.alternance2 tr:nth-child(odd), |
.alternance2 tr:nth-child(odd), |
Revision as of 10:02, 27 October 2023
/* 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;
}