Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Content Dark Mode: prefers-color-scheme CSS media query #1164

Closed
mheubusch opened this issue Mar 23, 2019 · 5 comments
Closed

Content Dark Mode: prefers-color-scheme CSS media query #1164

mheubusch opened this issue Mar 23, 2019 · 5 comments
Labels
Feature:Themes Dark mode, light mode, private browsing mode needs:gv GeckoView bug required to fix the issue. See bugzilla.mozilla.org 🙅 waiting Issues that are blocked or has dependencies that are not ready
Milestone

Comments

@mheubusch
Copy link
Contributor

mheubusch commented Mar 23, 2019

As a user with the Native Dark Theme/UI applied to Fenix, I want websites to display content in dark mode when the site publisher has created a palette that supports it so I will have less screen brightness and find the visual experience more pleasing.

Dependencies (Added by PM and Eng)

Acceptance Criteria (Added by PM)

I can visit a site that supports dark mode and view content in dark mode (for example, https://kevinchen.co/blog/support-macos-mojave-dark-mode-on-websites/)
I can visit a site that does not support dark mode and will see the default light content mode
I can switch my browser theme to light mode and visit a site that supports dark mode and view content in default/light mode.

┆Issue is synchronized with this Jira Task

@mheubusch mheubusch added the Epic label Mar 23, 2019
@mheubusch mheubusch added this to the Milestone 4 Backlog milestone Mar 23, 2019
@bleonard252
Copy link

How does one enable this dark mode? I can't get the latest master to build

@cadeyrn
Copy link
Contributor

cadeyrn commented Mar 24, 2019

@bleonard252: There is no dark mode yet. As you can see the issue is still open and in the Milestone 4 backlog with a due date of April 24 (but even if the milestone dates are not binding of course).

@bleonard252
Copy link

So this is a hypothetical situation?

@cpeterso
Copy link

cpeterso commented Mar 25, 2019

This Fenix issue refers to Gecko's prefers-color-scheme CSS media query, which allows websites to know whether the user prefers light or dark CSS color scheme or has no preference. Fenix will add a setting UI for users to set light, dark, or no preference. Perhaps Fenix could automatically switch to "prefers dark color scheme" if the user enables Android's Night Mode.

https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

@cpeterso cpeterso changed the title Content Dark Mode Content Dark Mode: prefers-color-scheme CSS media query Mar 26, 2019
@cpeterso
Copy link

@mheubusch - How does a user set their CSS dark mode preference (light, dark, no preference)?

The user story above says "No UX required for this" but it also says "I can switch my browser theme to light mode and visit a site that supports dark mode and view content in default/light mode."

Will the CSS dark mode preference be implicitly controlled by the browser's light/dark theme setting? Will it auto-detect whether Android OS's "Night Mode" is enabled?

@vesta0 vesta0 added P1 Current sprint Feature:Themes Dark mode, light mode, private browsing mode 🙅 waiting Issues that are blocked or has dependencies that are not ready needs:gv GeckoView bug required to fix the issue. See bugzilla.mozilla.org labels Apr 1, 2019
@ghost ghost removed the P1 Current sprint label Apr 5, 2019
@bifleming bifleming added this to Blocked by GV in Blocking Fenix Apr 17, 2019
@bifleming bifleming removed this from Blocked by GV in Blocking Fenix Apr 17, 2019
@data-sync-user data-sync-user changed the title Content Dark Mode: prefers-color-scheme CSS media query FNX2-16593 ⁃ Content Dark Mode: prefers-color-scheme CSS media query Aug 1, 2020
@data-sync-user data-sync-user changed the title FNX2-16593 ⁃ Content Dark Mode: prefers-color-scheme CSS media query FNX3-14789 ⁃ Content Dark Mode: prefers-color-scheme CSS media query Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX3-14789 ⁃ Content Dark Mode: prefers-color-scheme CSS media query FNX-4841 ⁃ Content Dark Mode: prefers-color-scheme CSS media query Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX-4841 ⁃ Content Dark Mode: prefers-color-scheme CSS media query FNX2-16593 ⁃ Content Dark Mode: prefers-color-scheme CSS media query Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX2-16593 ⁃ Content Dark Mode: prefers-color-scheme CSS media query Content Dark Mode: prefers-color-scheme CSS media query May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature:Themes Dark mode, light mode, private browsing mode needs:gv GeckoView bug required to fix the issue. See bugzilla.mozilla.org 🙅 waiting Issues that are blocked or has dependencies that are not ready
Projects
None yet
Development

No branches or pull requests

6 participants