From: Michael Tremer Date: Sat, 23 Mar 2024 18:00:49 +0000 (+0100) Subject: CSS: Automatically stripe all tables X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72e6d617191dd893fe25609ccca3c692b7911ad5;p=people%2Fms%2Fipfire-2.x.git CSS: Automatically stripe all tables Signed-off-by: Michael Tremer --- diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index 4bb36391e..2cd47cfac 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -1,3 +1,11 @@ +:root { + --color-green : #339933; + --color-green-invert : #ffffff; + --color-red : #993333; + --color-red-invert : #ffffff; + --color-grey : #d6d6d6; + --color-light-grey : #f0f0f0; +} /* This controls the width of the fixed width layouts */ @@ -290,6 +298,18 @@ table { padding-right: 0.5em; } +.tbl th[scope=row] { + text-align: left; +} + +.tbl tr:nth-child(odd) td { + background-color: var(--color-grey); +} + +.tbl tr:nth-child(even) td { + background-color: var(--color-light-grey); +} + .tbl th:first-child { border-left: 1px solid #363636; border-top: 1px solid #363636;