Closed Bug 1776573 Opened 2 years ago Closed 2 years ago

The light/dark emulation buttons do nothing

Categories

(DevTools :: Inspector, defect)

Firefox 103
x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: nagisa, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

What were you doing?

  1. Open the inspector tools on a page with @media (prefers-color-scheme) stylesheets;
  2. Select the html element;
  3. 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.

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?

Flags: needinfo?(simonas+bugzilla.mozilla.org)

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

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.

Flags: needinfo?(simonas+bugzilla.mozilla.org)
Attached video Video Demo (deleted) —

privacy.resistFingerprinting: true

RFP overwrites the color-scheme to light.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID

(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?

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

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: