[Linux] Brave does not respect system light/dark theme
See original GitHub issueDescription
On a Linux system, Brave has its own controls for light/dark mode, but it does not respect the system’s overall theme. If the option to use the “Gtk” theme is chosen, the Brave UI does respect the dark mode, however it doesn’t set the prefers-color-scheme
media query. This is a bug inherited from Chromium, and is being tracked here: https://bugs.chromium.org/p/chromium/issues/detail?id=998903
I know this should be fixed upstream, but Google doesn’t seem to care about it enough to justify the effort. One of the latest comments mentions a patch that a user has made, which solves the issue. The patch can be seen here in case a similar solution is intended.
Steps to Reproduce
- Open Brave on a Linux system with light theme enabled
- Open a website that supports
prefers-color-scheme
query, such as DuckDuckGo - Change system theme to dark mode
- Website does not change theme
Actual result:
This is how Brave and other Chromium browsers behave (left), and how Firefox does (right). Note how in Chromium, the page content doesn’t change
Expected result:
Brave/Chromium (left), Firefox (right)
Reproduces how often:
Easily reproduced
Brave version (brave://version info)
Brave | 1.21.74 Chromium: 89.0.4389.72 (Official Build) (64-bit) |
---|---|
Revision | 3f345f156bfd157bd1bea06310e55f3fb2490359-refs/branch-heads/4389@{#1393} |
OS | Linux |
Version/Channel Information:
- Can you reproduce this issue with the current release? Yes
- Can you reproduce this issue with the beta channel? Yes
- Can you reproduce this issue with the nightly channel? Haven’t tried, but no reason to believe it doesn’t happen there
Other Additional Information:
- Does the issue resolve itself when disabling Brave Shields? Not related
- Does the issue resolve itself when disabling Brave Rewards? Not related
- Is the issue reproducible on the latest version of Chrome? Yes
Miscellaneous Information:
Latest versions of Ubuntu have a quick Light/Dark mode toggle so it should be really easy to test
Issue Analytics
- State:
- Created 3 years ago
- Reactions:25
- Comments:20 (3 by maintainers)
Top GitHub Comments
I can confirm this issue on my system (pop-os / ubuntu). While you can set the theme to
GTK+
, which matches the system theme for the window and titlebar, the actual brave colors only have the optionsLight
andDark
and notmatch system theme
as available on windows and MacOS.Still an issue for me. Running Pop OS 21.10