Bug 419190 - Can't force light breeze-gtk theme in firefox's content window
Summary: Can't force light breeze-gtk theme in firefox's content window
Status: RESOLVED UPSTREAM
Alias: None
Product: Breeze
Classification: Plasma
Component: gtk theme (show other bugs)
Version: 5.18.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Janet Blackquill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-24 18:28 UTC by Heinz Wiesinger
Modified: 2020-08-04 05:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heinz Wiesinger 2020-03-24 18:28:29 UTC
SUMMARY

This is related to https://bugs.kde.org/show_bug.cgi?id=417493 and https://bugs.kde.org/show_bug.cgi?id=413111

The problem, as far as I can see is this (and it's probably very firefox/browser specific): The web was not made for dark themes. I tried several browsers and they each tried in their own way to make it work, but it's just an ugly mess. Most of the times you end up with poorly coded websites that only define a font color, or a background color but not both and you get white background with white text or black background with black text.

What firefox provides is a way to change the theme of the web view. "widget.content.gtk-theme-override" sets the gtk theme for only the web view and not the entire application. Before breeze became color theme aware, it was possible to set this setting to "Breeze", which resulted in Firefox itself using the system theme (Breeze Dark in my case), while websites would use the light colored breeze interface elements.

Now that breeze is color theme aware, there's essentially no difference anymore between "Breeze" and "Breeze-Dark" and no way to force the website window to use light colored interface elements, other than using a different theme then Breeze. This results in all kind of weird looking website and usability issues.

Firefox also has a setting called "widget.content.allow-gtk-dark-theme", which doesn't seem to have an effect on Breeze either though.

STEPS TO REPRODUCE
1. Set kde theme to Breeze-Dark
2. Set gtk theme to Breeze-Dark
3. Set widget.content.gtk-theme-override to Breeze in firefox's about:config

OBSERVED RESULT

Several websites I noticed having usability issues with this:

https://reviews.reviewboard.org/r/ => The search bar on top has light background with light text
https://www.cltairport.com/ => The search bar for "Find Your Flight" has light background with light text

There's definitely more (difficult to remember by memory)

Both websites look fine in chrome


EXPECTED RESULT

Content view should use light interface elements and respective color scheme.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.18.3
(available in About System)
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.13.2
Firefox: 68.6.0esr
Comment 1 Heinz Wiesinger 2020-07-21 17:10:15 UTC
I updated to Plasma 5.19.1 and Firefox ESR 78.0 and unfortunately that made things worse.

Not sure which one is a at fault here anymore, but setting Adwaita in the gtk theme override in firefox no longer has any influence on the color scheme being used for those interface elements. I can see the interface elements are still Adwaita, but even though the light theme is selected, it picks up the Breeze Dark colors.

The only way to bend firefox to my will now is to override the GTK theme for all of Firefox to Adwaita:light (using "GTK_THEME=Adwaita:light firefox") and then pick a dark firefox theme that resembles Breeze Dark :(
Comment 2 Heinz Wiesinger 2020-08-04 05:32:42 UTC
I searched a bit more and came across a reddit thread: https://www.reddit.com/r/kde/comments/djcngt/plasma_517_update_has_broken_firefox_theme_what/

In there it outlines that you can set the gtk theme override to "Breeze:light" directly, and that indeed works as intended (and as I wanted things to behave in the first place).

Unless you know this syntax of GTK-themes, however, this is impossible to figure out, which makes discoverability of it very poor.

Nonetheless, it's the feature I outlined in this request, so the feature request can be closed.