Add styles for complex layout tables

When there are tables that have rowspan header cells, avoid making those
tables stripy (override Docsy here). Also customize how the table is
laid out.
pull/40899/head
Tim Bannister 2023-04-21 09:03:02 +01:00
parent cd4cad9599
commit 1d4ea15236
No known key found for this signature in database
GPG Key ID: 468B7071483F639F
1 changed files with 24 additions and 0 deletions

View File

@ -45,6 +45,30 @@ body {
}
}
/* Complex table layout support */
.td-content, body.td-content {
table.complex-layout {
tbody tr,
tbody tr:nth-of-type(2n+1) {
/* Avoid stripes */
background-color: initial;
}
tbody tr:not(:last-child) > td[colspan] {
/* provide a visual break between rows */
padding-bottom: 1.5em;
}
tbody > tr > th[scope="row"]:first-child {
min-width: 9em;
}
tbody > tr > th[rowspan] {
vertical-align: middle;
}
border-collapse: separate;
border-spacing: 0 0;
max-width: calc(max(min(100vw, 110%), 40vw));
}
}
/* Emphasize first paragraph of running text on site front page */
body.td-home main[role="main"] > section:first-of-type .content p:first-child {