]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
CSS: Automatically stripe all tables
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 23 Mar 2024 18:00:49 +0000 (19:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 23 Mar 2024 18:00:49 +0000 (19:00 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/html/themes/ipfire/include/css/style.css

index 51c30b73e1435df3ec87d45baf0d34316bc222fb..d8503c17856eb68421d84bfe188344b412ad5f67 100644 (file)
@@ -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;