From 17ed2e345236b1aa762a345574db30d21d6c1303 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 23 Mar 2024 19:00:49 +0100 Subject: [PATCH] CSS: Automatically stripe all tables Signed-off-by: Michael Tremer --- html/html/themes/ipfire/include/css/style.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index 51c30b73e..d8503c178 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -3,6 +3,8 @@ --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 */ @@ -323,6 +325,14 @@ table { 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; -- 2.39.5