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

fix: add support for prefers-color-scheme CSS query #19250

Conversation

@trop
Copy link
Contributor

commented Jul 15, 2019

Backport of #19228

See that PR for details.

Notes: The prefers-color-scheme CSS media query now works correctly

fix: add support for prefers-color-scheme CSS query
The wiring to update prefs when you toggle between dark mode and light mode exists in the content layer but the actual value setting is done in either //chrome or in shell.  We need to set the preferred_color_scheme pref value in order for the CSS query to work correctly.  The DarkModeObserver in content will automatically regenerate prefs when dark mode is toggled.

Fixes #15540
@zcbenz

zcbenz approved these changes Jul 15, 2019

@codebytere codebytere merged commit bb0f4fd into 6-0-x Jul 15, 2019

12 checks passed

Artifact Comparison No Changes
Details
Semantic Pull Request ready to be squashed
Details
Valid Backport Valid Backport
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Jul 15, 2019

Release Notes Persisted

The prefers-color-scheme CSS media query now works correctly.

@codebytere codebytere deleted the trop/6-0-x-bp-fix-add-support-for-prefers-color-scheme-css-query-1563178957987 branch Jul 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.