Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element picker is light themed when uBO theme is set to auto in Firefox Nightly #2240

Closed
8 tasks done
bbhtt opened this issue Sep 2, 2022 · 12 comments · Fixed by gorhill/uBlock#3872
Closed
8 tasks done
Labels
Firefox specific to Firefox fixed issue has been addressed

Comments

@bbhtt
Copy link

bbhtt commented Sep 2, 2022

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

Description

GNOME 42.4 using system dark mode (Freedesktop colour scheme preference ie. Dark is set in Gnome control center>Appearance>Style), Firefox theme set to System - Auto, uBo theme set to auto.

Open the element picker in any page, it is light themed but uBO itself is dark themed (the settings page and the extension popup).

A specific URL where the issue occurs

https://hg.mozilla.org

Steps to Reproduce

  1. Open the element picker in any page

Expected behavior

It should be dark themed

Actual behavior

See that it is light themed

uBlock Origin version

1.44.0

Browser name and version

Firefox Nightly 106.0a1 (2022-09-01) (64-bit)

Operating System and version

Archlinux

@bbhtt
Copy link
Author

bbhtt commented Sep 2, 2022

I bisected this down to

$ mozregression --good 2022-08-10 --bad 2022-08-25

27:02.53 INFO: No more integration revisions, bisection finished.
27:02.53 INFO: Last good revision: 7c1e795e3c0750d5dcd99dab73be28e871c38979
27:02.53 INFO: First bad revision: 495ffb27c683fe2219b559708d3eb415847faa10
27:02.53 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=7c1e795e3c0750d5dcd99dab73be28e871c38979&tochange=495ffb27c683fe2219b559708d3eb415847faa10

which means https://bugzilla.mozilla.org/show_bug.cgi?id=1782596 is responsible. I think it is the same issue as this one reported as a regression from the previous one https://bugzilla.mozilla.org/show_bug.cgi?id=1787127

Please let me know if this is a separate issue, I can open a bug in BMO.

Thanks!

@gorhill
Copy link
Member

gorhill commented Sep 2, 2022

It works fine with Firefox 104.0.1, hence it appears to be a regression in Nightly.

@bbhtt
Copy link
Author

bbhtt commented Sep 2, 2022

It works fine with Firefox 104.0.1, hence it appears to be a regression in Nightly.

Yes this happens only in Nightly at the moment.

@gwarser gwarser added Firefox specific to Firefox external issue involving an external factor labels Sep 2, 2022
@krystian3w
Copy link

Works fine too in 105.0b6.

@bbhtt
Copy link
Author

bbhtt commented Sep 6, 2022

I think it is the same issue as this one reported as a regression from the previous one https://bugzilla.mozilla.org/show_bug.cgi?id=1787127

Wasn't fixed on today's nightly, which seems to include it as far as I can tell. So I've opened https://bugzilla.mozilla.org/show_bug.cgi?id=1789338

@emilio
Copy link

emilio commented Sep 6, 2022

Yeah, this seems kind of an unfortunate side-effect of the fix for #1408. The relevant <iframe> that uBlock injects has color-scheme: light, so as per w3c/csswg-drafts#7493, it now matches prefers-color-scheme: light.

Removing that, and just having the inherited color-scheme go through, would just work, and allow the iframe to remain transparent. But in Chromium which hasn't implemented this yet it'd regress that issue... So it's a bit tricky...

@gorhill
Copy link
Member

gorhill commented Sep 9, 2022

But in Chromium which hasn't implemented this yet it'd regress that issue... So it's a bit tricky...

I can inject color-scheme: light conditionally only when browser is not Firefox version 106+. @emilio This works?

gorhill added a commit to gorhill/uBlock that referenced this issue Sep 10, 2022
@gwarser gwarser removed the external issue involving an external factor label Sep 10, 2022
@uBlock-user
Copy link
Contributor

uBlock-user commented Sep 11, 2022

with github dark theme after gorhill/uBlock@707609d --

Capture

@emilio
Copy link

emilio commented Sep 11, 2022

@gorhill that doesn't quite work, I can write a patch that works everywhere. In fact I thought I replied to your comment and sent it already, but I must've dreamed it, sorry :-(

emilio added a commit to emilio/uBlock that referenced this issue Sep 11, 2022
This fixes uBlockOrigin/uBlock-issues#2240 and
should get the desired behavior regardless of browser.

Delay showing the iframe until load to prevent flashing a white
background on the initial about:blank.
@emilio
Copy link

emilio commented Sep 11, 2022

@gorhill gorhill/uBlock#3872

gorhill pushed a commit to gorhill/uBlock that referenced this issue Sep 11, 2022
…#3872)

This fixes uBlockOrigin/uBlock-issues#2240 and
should get the desired behavior regardless of browser.

Delay showing the iframe until load to prevent flashing a white
background on the initial about:blank.
@rishiraj88
Copy link

Great!

@gwarser gwarser added the fixed issue has been addressed label Sep 11, 2022
@bbhtt

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firefox specific to Firefox fixed issue has been addressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants