The light/dark emulation buttons do nothing
Categories
(DevTools :: Inspector, defect)
Tracking
(Not tracked)
People
(Reporter: nagisa, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
What were you doing?
- Open the inspector tools on a page with
@media (prefers-color-scheme)
stylesheets; - Select the
html
element; - Try clicking the sun/moon icons for “emulate light/dark colour scheme emulation for this page”.
What happened?
The page appearance did not change at all.
What should have happened?
The page appearance should have changed.
Anything else we should know?
This works okay in chromium. This has never worked in Firefox as far as I remember, I remember trying it occasionally every couple months. The print media emulation does work okay.
This occurs with both my usual as well as a fresh profile.
Comment 1•2 years ago
|
||
Could you tell which page you are testing this on? For example on this page, if I toggle dark color scheme simulation it does turn the page dark
At the OS level, are you using a light or a dark theme?
Also, could you tell us which OS you're on?
Comment 2•2 years ago
|
||
Just checked in Ubuntu 20 and it works fine
Also checked having a dark Firefox theme (which makes bugzilla use dark mode by default), and hitting the sun icon did change the page
Reporter | ||
Comment 3•2 years ago
|
||
I have tested by creating another new profile, rather than using the “fresh” profile I usually test for bugs with, and the light/dark switch did work. I have been using ddg.gg
for testing.
The OS is NixOS, running sway.
I am attaching about:support. I don’t recall changing preferences with this profile, but about:config
will have a couple changes I’ve made to verify bugs. I haven’t touched anything related to the inspector, however. I’m attaching the about:support in case it helps. As well as a video demo as a proof.
Given this is a development tool, I would probably expect this to work ~unconditionally, overriding any system wide settings and such. Or perhaps not show the buttons if the functionality for some reason is unavailable.
Reporter | ||
Comment 4•2 years ago
|
||
Reporter | ||
Comment 5•2 years ago
|
||
Comment 6•2 years ago
|
||
privacy.resistFingerprinting: true
RFP overwrites the color-scheme to light.
Comment 7•2 years ago
|
||
(In reply to Tom Schuster [:evilpie] from comment #6)
privacy.resistFingerprinting: true
RFP overwrites the color-scheme to light.
Good to know. In such case we should probably disable the buttons in the inspector, or maybe have something specific in the implementation so DevTools would take over?
Comment 8•2 years ago
|
||
In theory we could also prefer the color scheme selected by devtools over RFP. Not sure if this is something we want to.
https://searchfox.org/mozilla-central/source/dom/base/Document.cpp#17637-17646
Description
•