Rework the tables componets styles to work for all browsers, :has() support is limited.
This commit is contained in:
parent
86d7c8d001
commit
3bf7c9ad3a
1 changed files with 21 additions and 14 deletions
|
|
@ -7,17 +7,22 @@
|
||||||
padding: var(--padding);
|
padding: var(--padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
tr:nth-child(odd) {
|
thead {
|
||||||
background-color: var(--color-row-odd);
|
tr {
|
||||||
|
background-color: var(--color-row-header);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tr:nth-child(even) {
|
tbody {
|
||||||
background-color: var(--color-row-even);
|
tr {
|
||||||
}
|
&:nth-child(odd) {
|
||||||
|
background-color: var(--color-row-odd);
|
||||||
|
}
|
||||||
|
|
||||||
// Add first-of-type to increase specificity.
|
&:nth-child(even) {
|
||||||
tr:first-of-type:has(th) {
|
background-color: var(--color-row-even);
|
||||||
background-color: var(--color-row-header);
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,11 +31,6 @@
|
||||||
--padding: .5rem;
|
--padding: .5rem;
|
||||||
|
|
||||||
@include respond-to-max(s) {
|
@include respond-to-max(s) {
|
||||||
th,
|
|
||||||
td {
|
|
||||||
padding: var(--padding);
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
th {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
@ -44,7 +44,14 @@
|
||||||
content: attr(aria-label) ':';
|
content: attr(aria-label) ':';
|
||||||
font-weight: var(--fw-bold);
|
font-weight: var(--fw-bold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:first-of-type {
|
||||||
|
padding-block-start: var(--padding);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
padding-block-end: var(--padding);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue