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

Download popup with light background on dark theme #250

Closed
3 of 13 tasks
smowtenshi opened this issue Oct 17, 2021 · 9 comments
Closed
3 of 13 tasks

Download popup with light background on dark theme #250

smowtenshi opened this issue Oct 17, 2021 · 9 comments
Labels
Browser::Upstream Changes or bugs from Firefox Class::Color Color, background, blur, etc. Component::Popup-Menu Toolbar or URL bar's popup Env::Linux Issues on Linux Issue::Bug Something isn't working

Comments

@smowtenshi
Copy link

Describe the bug
I recently noticed that when downloading files, a pop-up has white background even though I have dark theme set.

Expected behavior
The pop-up has background related to the theme.

Screenshots

Environment:

Additional context

Doing as said in #244 (comment) kind of solves the colors. Applying userChrome.css from dev branch doesn't help at all though. Are these issues related or is it something completely else?

@smowtenshi smowtenshi added the Issue::Bug Something isn't working label Oct 17, 2021
@black7375 black7375 added Class::Color Color, background, blur, etc. Component::Popup-Menu Toolbar or URL bar's popup Env::Linux Issues on Linux labels Oct 17, 2021
@black7375
Copy link
Owner

It seems to be Nightly's problem.
In the lower version 93, it looks fine.
image

@smowtenshi
Copy link
Author

smowtenshi commented Oct 17, 2021

This is surprising. I guess I should report it on the Bugzilla.
Thank you for checking it!

@black7375
Copy link
Owner

Perhaps this media query doesn't applied properly.

@media (-moz-toolbar-prefers-color-scheme: dark) {
}

@smowtenshi
Copy link
Author

smowtenshi commented Oct 17, 2021

Although on a clean profile everything works just fine 🤔

Aand with a dev version it doesn't 🤔

@smowtenshi
Copy link
Author

Seems like in

Firefox-UI-Fix/userChrome.css

Lines 1124 to 1137 in 24fe2cf

/*- Dialog ---------------------------------------------------------------*/
#commonDialog,
#editCaCert,
#deleteCertificate,
#exceptiondialog,
#unknownContentType,
#app-picker,
#topBar, /* #topBar, #mainDeck: Page Info */
#mainDeck {
-moz-appearance: none !important; /* For Mac */
color: var(--in-content-page-color) !important;
background-color: var(--in-content-page-background) !important;
/* border-radius: 0 0 8px 8px !important; */
}
rules

color: var(--in-content-page-color) !important;
background-color: var(--in-content-page-background) !important;

have that effect on the popup window. Though disabling them.. makes it a little bit weird, as you can see below.

@black7375 black7375 added the Browser::Upstream Changes or bugs from Firefox label Oct 21, 2021
@black7375
Copy link
Owner

black7375 commented Oct 21, 2021

As a result of the investigation, prefers-color-scheme should be used.

@media (-moz-toolbar-prefers-color-scheme: dark) {
}

->

@media (prefers-color-scheme: dark) {
}

mozilla/gecko-dev@c4b7109
I will apply it later after investigating backward compatibility.

@black7375
Copy link
Owner

Now will be works!!
Thanks for the report 👍

black7375 added a commit that referenced this issue Oct 30, 2021
`layout.css.prefers-color-scheme.content-override` at 95+
- 0: dark
- 1: light
- 2: OS (old behavior)
- 3: browser (the new default)

Unfortunately, there are limits.
- In Nightly
  - Works fine.
  - However, `-moz-toolbar-prefers-color-scheme: dark` should be removed as legacy.
- Stable to Dev
  - If the system is in dark mode, it is unconditionally dark mode.
  - However, if the system is used in dark mode, the browser theme will also use dark mode, so it is not a very big side effect.
@black7375
Copy link
Owner

black7375 commented Nov 5, 2021

Hmm..
It doesn't work properly on 94 or higher.
I'll open an issue for tracking.

https://bugzilla.mozilla.org/show_bug.cgi?id=1739566

@black7375 black7375 reopened this Nov 5, 2021
@black7375
Copy link
Owner

I found out something interesting.

If privacy.resistFingerprinting is true, dark mode is not applied to general content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser::Upstream Changes or bugs from Firefox Class::Color Color, background, blur, etc. Component::Popup-Menu Toolbar or URL bar's popup Env::Linux Issues on Linux Issue::Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants