From b57b53554e58f30a5633ee4e808f86d353ef3df2 Mon Sep 17 00:00:00 2001 From: Jonas Tobias Hopusch Date: Mon, 19 Jul 2021 00:06:57 +0200 Subject: [PATCH] Switch to media logic for themes and misc fixes --- static/css/general.css | 51 +++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/static/css/general.css b/static/css/general.css index 5189499..e8acbfb 100644 --- a/static/css/general.css +++ b/static/css/general.css @@ -11,29 +11,54 @@ header, footer { .globalnav{ display: flex; flex-direction: row; - border-collapse: collapse; + border: none; } .globalnav-element { display: inline-block; - border-width: 1px; - border-style: solid; flex-grow: 1; + padding: 0.5em 0; + margin: 0 1px; } -body.dark-theme a { - color: lightskyblue; +code { + display: inline-block; + background-color: lightgray; + color: green; + padding: 0 0.5em; } -body.dark-theme .globalnav-element { - border-color: black; +@media (prefers-color-scheme: dark) { + html { + background-color: black; + color: white; + } + + .globalnav-element { + background-color: #222; + } + + code { + background-color: #444; + color: lawngreen; + } + + a { + color: lightskyblue; + } } -body.light-theme .globalnav-element { - border-color: white; -} +@media (prefers-color-scheme: light) { + html { + background-color: white; + color: black; + } -pre, code { - background-blend-mode: darken; - color: lightgreen; + .globalnav-element { + background-color: #ddd; + } + + code { + color: green; + } }