From a168e4261ff46d9aeac545a76b9a2ac9b49bc57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Tue, 15 Jun 2021 17:39:34 +0200 Subject: [PATCH] doc: move color overrides into light color scheme block Otherwise when a user is visiting with dark color scheme preference, the code fragments would appear with far too bright colors. --- doc/custom.css | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/custom.css b/doc/custom.css index 8df7dd840..43690cb81 100644 --- a/doc/custom.css +++ b/doc/custom.css @@ -5,10 +5,15 @@ --header-background: #729fcf; --header-foreground: rgba(255, 255, 255, 0.7); --font-family: 'Source Sans Pro', 'Source Sans', sans-serif; - --code-background: #f5f5f5; - --code-foreground: #333333; - --fragment-background: #f5f5f5; - --fragment-foreground: #333333; - --fragment-keyword: #c7254e; - --fragment-link: #729fcf; +} + +@media (prefers-color-scheme: light) { + :root { + --code-background: #f5f5f5; + --code-foreground: #333333; + --fragment-background: #f5f5f5; + --fragment-foreground: #333333; + --fragment-keyword: #c7254e; + --fragment-link: #729fcf; + } }