Bug 1908200 Comment 14 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Thanks for all that info!

So, if I'm understanding correctly:
- As of the Firefox 117 snap, with certain dark themes and gtk.css customizations, you ended up with dark test on a dark background.
- However, nowadays you're seeing light text on a dark background (so the text is readable).
- But you recall the theme colors being used for this UI at some point in the past, hence this bug here.

I'm glad the black-text-on-black-background issue is resolved. :) As a shot-in-the-dark, maybe that was caused in some way by bug 1838460 (which was a gtk theming change that shipped in Firefox 117)?  In any case, though, probably not worth worrying about too much at this point now that it's fixed.

Regarding your recalled "better" behavior with theme-controlled background colors for the sidebar etc: it's hard to chase that thread without knowing what build was "good" or being able to reproduce that behavior (per my spot testing of a handful of old versions in comment 2).  If you're sure about that and your'e interested to poke, perhaps you might be able to pinpoint a "good" Nightly version using [mozregression](https://mozilla.github.io/mozregression/)?  (installable as `pipx install mozregression` if you have pipx, and then launchable as `mozregression --launch 2023-01-01` for example to launch that Nightly build)

For what it's worth, I used devtools to inspect a Firefox window to see how the sidebar background is defined -- it's here:
https://searchfox.org/mozilla-central/rev/a95ca2357da6bccc6c5b12f662dd8a4e5bcbf892/browser/themes/shared/sidebar.css#7-8,13-14
```
:root {
  --sidebar-background-color: -moz-sidebar;
...
#sidebar-box {
  background-color: var(--sidebar-background-color);
```
...where `-moz-sidebar` is a system color keyword whose value comes from this `mSidebar` assignment on Linux, I think -- coming directly from the GTK theme:
https://searchfox.org/mozilla-central/rev/a95ca2357da6bccc6c5b12f662dd8a4e5bcbf892/widget/gtk/nsLookAndFeel.cpp#2088-2093
...though also you can override it by creating an about:config pref `ui.-moz-sidebar` and setting that to e.g. the string `rgb(0,255,0)` for lime or `rgb(255,0,255)` for hot pink.

I wonder if your good-ol'-days recollection is from a time where you either had a GTK theme (or gtk.css) that provided colors that just-so-happened to match your Firefox theme (and Firefox was picking up on **those** GTK theme colors as noted above, *not* the Firefox theme colors)?  Or perhaps you had set `ui.-moz-sidebar` etc. to colors that matched your preferences, and your customizations to those prefs have since been lost?

In any case: these days I think the correct way to adjust this is to use one of those methods -- adjusting either your GTK theme or your Firefox preferences to set your preferred foreground/background colors.

emilio might know if there's some further nuance here, too.  But in the absence of an identified "good" old Firefox version, I'm suspicious that the recalled good behavior was in fact coming from the GTK theme settings (which Firefox uses) or from about:config settings.
Thanks for all that info!

So, if I'm understanding correctly:
- As of the Firefox 117 snap, with certain dark themes and gtk.css customizations, you ended up with dark text on a dark background in various sidebars.
- However, nowadays you're seeing light text on a dark background in those sidebars (so the text is readable once again).
- But you recall the Firefox-theme-colors being used instead for that sidebar UI at some point in the past, hence this bug here being filed.

I'm glad the black-text-on-black-background issue is resolved. :) As a shot-in-the-dark, maybe that was caused in some way by bug 1838460 (which was a gtk theming change that shipped in Firefox 117)?  In any case, though, probably not worth worrying about too much at this point now that it's fixed.

Regarding your recalled "better" behavior with theme-controlled background colors for the sidebar etc: it's hard to chase that thread without knowing what build was "good" or being able to reproduce that behavior (per my spot testing of a handful of old versions in comment 2).  If you're sure about that and you're interested to poke, perhaps you might be able to pinpoint a "good" Nightly version using [mozregression](https://mozilla.github.io/mozregression/)?  (installable as `pipx install mozregression` if you have `pipx`, and then launchable as `mozregression --launch 2023-01-01` for example to launch that Nightly build with a disposable Firefox profile)

For what it's worth, I used devtools to inspect a modern Firefox Nightly window to see how the sidebar background is defined -- it's here:
https://searchfox.org/mozilla-central/rev/a95ca2357da6bccc6c5b12f662dd8a4e5bcbf892/browser/themes/shared/sidebar.css#7-8,13-14
```
:root {
  --sidebar-background-color: -moz-sidebar;
...
#sidebar-box {
  background-color: var(--sidebar-background-color);
```
...where `-moz-sidebar` is a system color keyword whose value comes from this `mSidebar` assignment on Linux, I think -- coming directly from the GTK theme:
https://searchfox.org/mozilla-central/rev/a95ca2357da6bccc6c5b12f662dd8a4e5bcbf892/widget/gtk/nsLookAndFeel.cpp#2088-2093
...though also you can override it by creating an about:config pref `ui.-moz-sidebar` and setting that to e.g. the string `rgb(0,255,0)` for lime or `rgb(255,0,255)` for hot pink.

I wonder if your good-ol'-days recollection is from a time where you either had a GTK theme (or gtk.css) that provided colors that just-so-happened to match your Firefox theme (and Firefox was picking up on **those** GTK theme colors as noted above, *not* the Firefox theme colors)?  Or perhaps you had set `ui.-moz-sidebar` etc. to colors that matched your preferences, and your customizations to those prefs have since been lost?

In any case: these days I think the correct way to adjust this is to use one of those methods -- adjusting either your GTK theme or your Firefox preferences to set your preferred foreground/background colors.

emilio might know if there's some further nuance here, too.  But in the absence of an identified "good" old Firefox version, I'm suspicious that the recalled good behavior was in fact coming from the GTK theme settings (which Firefox uses) or from about:config settings.

Back to Bug 1908200 Comment 14