Description of problem: Under KDE firefox CCS media query prefers-color-scheme does not support dark mode. Version-Release number of selected component (if applicable): firefox 67. How reproducible: Steps to Reproduce: 1. login to KDE dektop 2. System Settings/Workspace Theme/Look and Feel - choose Breeze Dark 3. Start Firefiox 4. Browse to https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme 5. Browse to http://www.barrys-emacs.org/ Actual results: For mozilla page: notice that in "Results", "Day (changes in dark scheme)" is show light For barrys-emacs page: page is shown in the light design Expected results: For mozilla page: notice that in "Results", "Day (changes in dark scheme)" is show dark For barrys-emacs page: page is shown in the dark design Additional info: Firefox 67 dark mode work for Gnome and macOS
Triaging to Firefox
That depends on your actual theme and window text/background color. What if you set Breeze Dark in Gnome, does it work? Thanks.
I do not have gnome installed anywhere to try or know anyone that uses Gnome. Can you try the Breeze Dark in Gnome yourself? I assume you are thinking that its the theme that has the bug in it?
(In reply to Barry Scott from comment #3) > I do not have gnome installed anywhere to try or know anyone that uses Gnome. > > Can you try the Breeze Dark in Gnome yourself? As I have hundreds of Firefox bug to fix to I don't put effort to bugs which don't affect large user base and/or reporter is not willing to put an effort into it. The latter tells me that the bug is not important enough for you.
I have no desire to increase your work load, was baffled by the request. I looked into what the Breeze Dark theme is. If I understand correctly its from the plasma-breeze src.rpm and it KDE specific only (has C++ code in it, not config files). Therefore its not possible to test with gnome. I think this bug should be directed towards the KDE folks not firefox. My guess is that the query that firefox does to set CSS media query prefers-color-scheme is not working in the KDE environment. Hope this is helpful.
I see no evidence this is nothing but firefox-specific behavior, and not a kde bug. In particular, how is kde/plasma expected to be able to influence firefox behavior?
I have read enought firefix code to know where the decision is made. I'll report back my finding tomorrow which I get gdb to find out what is happening at runtime.
Copied from my bug report against Firefox on this matter. Firefox does need a GTK3 theme. I used the Mojave-dark from the theme store and then Firefox runs in dark mode. This can be done from the Plasma System-settings by filtering on GTK. That brings up an Application appearance panel which allows the GTK theme to be configured. Curiously googling did not bring up any pointers to this mechanism. Thank you for the help in tracking this down. I will now close this bug as its resolved.