-
Notifications
You must be signed in to change notification settings - Fork 128
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
(Automatic) dark mode #186
Comments
I'd be happy to take this one if it's available |
Sure… feel free to do so. |
So I hit an interesting snag here. If I opt for light mode on Mac but dark mode on Firefox, It's only when both the browser and OS are set to dark (or light) that the desired behavior results: Let me know if you're alright with that. I'll look into ways to read the theme preference directly from the browser in the mean time. (By the way this issue arises whether you use the CSS media query or JS, eg |
Yes, I think this is a system limitation I am totally fine with… 😄
Given the current APIs, i doubt it's possible.
Hint: I've made an add-on to toggle that/that overrides this. |
BTW
I've also already complained here about that: |
Yeah it's not looking promising ...
Ha I see you've been contending with this issue for a while. Definitely seems like something FF should improve
In that case I'll submit a PR. Please let me know of any issues with the changes I've made. If something seems obvious, let's just say I'm taking you up on the "good-first-issue" tag here 😄 |
Current experience
on GNOME (Fedora/Linux) with Firefox 68 here.
In contrast to Firefox' own/internal popups:
Problems
Expected
To do so, there is this new fancy CSS media query: https://developer.mozilla.org/docs/Web/CSS/@media/prefers-color-scheme aka
prefers-color-scheme
But should the need arise, you can use this JS API: https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
Note: There must not be any manual selection of this dark mode. I'd consider this an unnecessary option…
Of course, as always, adhere to the Photon design.
However, this requires some JS changes (which is possible as explained above), but actually even worse: Many QR code scanners read them. (see Warning for inverted QR codes (when background color is dark and foreground light) #20)
So, if we do so, we definitively need to implement Warning for inverted QR codes (when background color is dark and foreground light) #20 first. Or find some way that is still scannable, but looks decent in the dark mode.
Good first issue
This is a good first issue, as it is likely a CSS only change. (And hopefully with not-so many CSS changes.)
Also any more ideas on this are appreciated. 😃
The text was updated successfully, but these errors were encountered: