@ou-imdt/css
Version:
The IMDT CSS library styles native elements with light, extendable CSS. It is developed for Interactive Media Developers at the Open University.
36 lines (31 loc) • 930 B
CSS
/* Odd & Even */
:root,
:host {
--striped-odd-bg: var(--bg1);
--striped-odd-fg: var(--fg1);
--striped-even-bg: #E9EEF6;
--striped-even-fg: initial;
--striped-border-color: #D2DDED;
--striped-border-width: 2px;
--striped-border-style: solid;
--striped-li-padding: 0 0.3rem;
}
.striped.bordered {
border: var(--striped-border-color) var(--striped-border-width) var(--striped-border-style);
}
ul.striped.bordered li:not(:last-of-type) {
border-bottom: var(--striped-border-color) var(--striped-border-width) var(--striped-border-style);
}
:where(ul, ol).striped:not(table)>li {
padding: var(--striped-li-padding);
}
.striped:not(table)>*:nth-child(odd),
table.striped tr:nth-child(odd) {
background: var(--striped-odd-bg);
color: var(--striped-odd-fg);
}
.striped:not(table)>*:nth-child(even),
table.striped tr:nth-child(even) {
background: var(--striped-even-bg);
color: var(--striped-even-fg);
}