Closed Bug 1695990 Opened 3 years ago Closed 2 years ago

[Win10][Proton] When lightweight theme light/dark-ness doesn't match OS light/darkness, menus/dropdowns in the library/sidebar/preferences/other-non-lwthemed contexts do not have the right colour scheme

Categories

(Firefox :: Menus, defect, P5)

Desktop
All
defect
Points:
3

Tracking

()

RESOLVED DUPLICATE of bug 1760317
Tracking Status
firefox88 --- affected

People

(Reporter: Gijs, Unassigned)

References

Details

(Whiteboard: [proton-context-menus])

In bug 1692238 / bug 1692237, we made it so we honour OS dark theme for the windows 10 custom context menu and <select>/<menulist> dropdowns, in window contexts where we don't know the lightweight theme status. This includes the sidebar, the preferences, the library window, and similar contexts. We did this because in those contexts, it is not trivially possible to get the lightweight-theme based information.

This means that if you use the "light" lightweight theme, and the OS dark theme, we will use a dark context menu (and dark dropdowns for <select> and/or <menulist> elements). The inverse is presumably also true - with the Firefox "dark" lightweight theme, and the OS light theme, we will use light context menus.

UX has indicated that the Firefox theme should be what determines the colour theme.

This will probably mean setting some kind of root attribute in all of the contexts that don't currently get styled by the lightweight/webextension theme, based on the same computation that we use to apply the lwtheme-brighttext pseudo-selector on the main Firefox window.

We cannot easily start applying all the same lwtheme pseudo-selectors because that would affect a lot of other colours/layouts in ways that the styling of all those contexts is really not able to cope with right now, and we don't have the time to change that.

Duplicate of bug 1529323?

(In reply to Tim Nguyen :ntim from comment #1)

Duplicate of bug 1529323?

I don't think so - the variable definitions used by the menu don't rely on prefers-color-scheme.

(In reply to :Gijs (he/him) from comment #2)

(In reply to Tim Nguyen :ntim from comment #1)

Duplicate of bug 1529323?

I don't think so - the variable definitions used by the menu don't rely on prefers-color-scheme.

Unless I'm misunderstanding something, they do: https://searchfox.org/mozilla-central/rev/002023eb262be9db3479142355e1675645d52d52/toolkit/themes/windows/global/global.css#63

Wouldn't making prefers-color-scheme work accordingly to the theme colors fix this?

Points: --- → 3

(In reply to Tim Nguyen :ntim from comment #3)

(In reply to :Gijs (he/him) from comment #2)

(In reply to Tim Nguyen :ntim from comment #1)

Duplicate of bug 1529323?

I don't think so - the variable definitions used by the menu don't rely on prefers-color-scheme.

Unless I'm misunderstanding something, they do: https://searchfox.org/mozilla-central/rev/002023eb262be9db3479142355e1675645d52d52/toolkit/themes/windows/global/global.css#63

Oh, hm, I missed that when looking at the code, I thought it was all lwtheme. Sorry for the confusion.

Wouldn't making prefers-color-scheme work accordingly to the theme colors fix this?

Maybe, but it's not the only possible fix and has a bunch of other implications that we may not have time to address in the proton timeframe.

(In reply to :Gijs (he/him) from comment #4)

(In reply to Tim Nguyen :ntim from comment #3)

(In reply to :Gijs (he/him) from comment #2)
Maybe, but it's not the only possible fix and has a bunch of other implications that we may not have time to address in the proton timeframe.

Sure, just mentioning this mismatch between lwtheme & system theme bug is present in other places (e.g. common.css pages), and isn't necessarily new to context menus...

See Also: → 1703876
See Also: → 1705501
See Also: 1705501
No longer blocks: proton-context-menus, 1692238
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
See Also: 1703876
You need to log in before you can comment on or make changes to this bug.