question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Linux] Brave does not respect system light/dark theme

See original GitHub issue

Description

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

  1. Open Brave on a Linux system with light theme enabled
  2. Open a website that supports prefers-color-scheme query, such as DuckDuckGo
  3. Change system theme to dark mode
  4. 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 before

Expected result:

Brave/Chromium (left), Firefox (right)

after

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:open
  • Created 3 years ago
  • Reactions:25
  • Comments:20 (3 by maintainers)

github_iconTop GitHub Comments

15reactions
jmbuhrcommented, Apr 6, 2021

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 options Light and Dark and not match system theme as available on windows and MacOS. image

5reactions
satrinity402commented, Apr 15, 2022

Still an issue for me. Running Pop OS 21.10

Read more comments on GitHub >

github_iconTop Results From Across the Web

Brave does not follow GTK theme in Gnome - Desktop Support
Description of the issue: Brave does not change to dark mode in Linux with the Gnome desktop environment. Specifically in Fedora in my...
Read more >
Default theme should be dark or light depending on OS ...
macOS Mojave and Windows 10 support dark vs light appearance themes. Brave should respond to those preferences and default to that OS-level ...
Read more >
Cloudron - Dark / Night Theme
It would be nice to have a dark theme for when working late at night, ... -brave-browser-linux-brave-does-not-respect-system-lightdark-theme.
Read more >
Explicit Dark and Light themes (!= Default theme in OS dark ...
Edge, Vivaldi, Opera and Brave do not use accent color for titlebar. Internet Explorer uses accent color but with a transparent overlay for...
Read more >
Light and dark mode in just 14 lines of CSS
For this light/dark mode solution, define two colour variables at the document root ... It might not work on every system yet, I'm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found