From 3d9d973ced74ac9ae6b4c7c14d08e7949117617f Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sat, 17 Aug 2024 19:20:17 +0500 Subject: [PATCH] Move invertion and color scheme to `:root` only `:root` should be used as the only source of truth. --- src/pages/options/index.html | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/pages/options/index.html b/src/pages/options/index.html index 6106620..5d7f804 100644 --- a/src/pages/options/index.html +++ b/src/pages/options/index.html @@ -33,11 +33,20 @@ /* Reset ends */ :root { - background-color: black; + /* + The initial theme is light but it's quickly inverted to dark. + Dark theme should be the first theme user sees by default. + TODO: Ponder more. E.g. valid color (green) must remain the + same even after invertion. Also a flash/blink of colors + during invertion must be avoided. + */ + background-color: white; /* Not transparent. */ color: black; - color-scheme: dark; - border: 0 none black; - outline: 0 none black; + border: 0 none white; + outline: 0 none white; + color-scheme: light; + /* COLOR INVERTION */ + filter: invert(0); /* TODO: temporary disabled. */ } :root, html, body { /*background: url('./gsbg.png') no-repeat;*/ @@ -48,10 +57,6 @@ --ribbon-color: #0075ff; /* #4169e1;*/ font-family: Ubuntu, Arial, sans-serif; font-size: 75%; - - color-scheme: light; /* Will be inverted to dark. */ - /* COLOR INVERTION */ - filter: invert(1); padding: 10px; } @@ -102,7 +107,7 @@ .use-preferred-color-scheme { /*background-color: violet; color: darkred;*/ - color-scheme: light; + /*color-scheme: light;*/ }/* @media (prefers-color-scheme: dark) { .use-preferred-color-scheme {