`dark_theme` manifest field doesn't work on Linux
Categories
(WebExtensions :: Themes, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: flr73ji00, Unassigned)
Details
Attachments
(1 file)
3.25 KB,
application/json
|
Details |
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0
Steps to reproduce:
I loaded a temporary add-on / theme containing a manifest.json file with theme and dark_theme fields describing Firefox UI appearance when operating system theme is set to light and dark theme, respectively.
Actual results:
Firefox only shows UI described in the theme field in manifest.json, regardless of OS theme.
Expected results:
Firefox should switch between light and dark themes when system theme is changed, like the default Firefox theme.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 3•5 years ago
|
||
The dark_theme
manifest field works as expected on my side with this test add-on. Does the default theme switch properly according to the system theme for you ? If not, it's likely you have privacy.resistFingerprinting
enable, or it could be a bug general to prefers-color-scheme: dark
.
Thank you for replying.
I just tried loading the manifest.json
you attached and it immediately switches to light theme, even though my OS theme is dark. Changing the OS theme does nothing to change the Firefox UI theme with this manifest.json
theme loaded (it does change the bugzilla website theme). I don't have privacy.resistFingerprinting
enabled. The default Firefox theme works properly, following the OS theme.
I'm running Fedora 31 with GNOME DE 3.34 on Wayland. Please let me know if you need more info.
Comment 5•5 years ago
|
||
I suspect the dark theme you were seeing on the default theme is the theme using system colors (which are dark in your case), but it's different from the dark theme you select from the add-ons manager. To confirm, is your about:preferences page or Bugzilla dark for you ?
dark_theme
works on platforms where prefers-color-scheme: dark
works (Windows and macOS), and IIRC, support on Linux was intentionally removed a while ago. If you set ui.systemUsesDarkTheme
to 1
, you should see the dark_theme
in the manifest applied.
Pages like Bugzilla, DuckDuckGo, about:preferences
, about:addons
, about:config
follow the OS theme and switch between light and dark theme depending on the system theme.
With the manifest.json
applied and ui.systemUsesDarkTheme
set to 1
, the websites and about sites are fixed in dark mode, but the Firefox theme remains light, regardless of the system theme.
Comment 7•5 years ago
|
||
Resetting severity to default of --
.
Comment 8•5 years ago
|
||
Ah right, we do exclude Linux from toggling dark_theme
: https://searchfox.org/mozilla-central/source/toolkit/modules/LightweightThemeConsumer.jsm#204-208 which makes sense for the default theme. Sorry I missed that.
I guess this could be reconsidered for non-default themes though by checking the ID of the theme.
Updated•5 years ago
|
Fixed by Bug 1546540 Part 4.
Description
•