From b2b72247bc926ed2300802868831d4e1a3662e43 Mon Sep 17 00:00:00 2001 From: danix Date: Sun, 26 Feb 2023 06:26:06 +0100 Subject: [PATCH] started using css variables. --- gitweb-danixland/gitweb.css | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gitweb-danixland/gitweb.css b/gitweb-danixland/gitweb.css index 2e92d91..a6014e3 100644 --- a/gitweb-danixland/gitweb.css +++ b/gitweb-danixland/gitweb.css @@ -41,6 +41,17 @@ table { a { outline: none; } +/* Colors +------------------------------------------------------------------------- */ +:root { + --bg: #D8D9CF; + --fg: #393E46; +} +@media screen and (prefers-color-scheme: dark) { + --bg: #393E46; + --fg: #D8D9CF; +} + /* General - light theme ---------------------------------------------------------------------------- */ @@ -54,8 +65,8 @@ body { font: 13px Helvetica,arial,freesans,clean,sans-serif; line-height: 1.4; margin: 0 0 105px; - background-color: #fff; - color: #000000; + background-color: var(--bg); + color: var(--fg); } /* Monospaced Fonts */ @@ -763,12 +774,3 @@ td.pre, div.pre, div.diff { .kwc { color:#d4663d; } .kwd { color:#2928ff; } - -@media screen and (prefers-color-scheme: dark) { -/* General - dark theme ----------------------------------------------------------------------------- */ - body { - background-color: #303030; - color: #e2e2e2; - } -} -- 2.20.1