Subject: [mumi] Some HTML elements don't respond to preferred color scheme when JS is disabled

From: Luis Felipe <[email-masked]>
Date: Sat, 8 Jun 2024 19:54:43 +0000

Package: mumi

Hi,

When using a web browser with JavaScript disabled, the body element and 
the text input of class ".tokenInput" don't use the correct color theme. 
This doesn't affect people who use light themes, but it does affect 
people who use dark themes because it introduces contrast issues (light 
text on light backgrounds).

STEPS TO REPRODUCE

 1. Launch IceCat web browser
 2. Enable user defined color scheme preferences by disabling
    Application menu → IceCat Settings → Resist Fingerprinting
 3. Set your color scheme preferences to Dark in: Application menu →
    Settings → Language and Appearance → Website appearance
 4. Disable JavaScript in: Application menu → IceCat Settings → Disable
    Javascript
 5. Visit https://issues.guix.gnu.org/
 6. Press Ctrl+F5 to avoid using cached resources

EXPECTED RESULT

The website uses the dark color scheme.

UNEXPECTED RESULT

The HTML body element and the text input of class ".tokenInput" don't 
use the dark color scheme, while the rest of the elements do use it.

ADDITIONAL INFORMATION

There seems to be something wrong with the functionality of the 
"--background-color" variable. While it seems to have appropriate values 
assigned to it for every color scheme case (prefers light, prefers dark, 
and no preference), the dark color value is not being used when needed. 
I still don't know why.

WORKAROUND

Assigning the value of "var(--nav-background-color)" to the 
"background-color" property of the affected elements solves the issue.

-- 
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/