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

auto switch of color theme based on browser API prefers-color-scheme #87405

Merged
merged 9 commits into from Dec 19, 2019

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Dec 19, 2019

Fixes #86600
Fixes #61519

This PR is competes the work from #86600

  • polish and refactoring
  • renamed settings as

'window.autoDetectColorScheme'
'workbench.preferredLightColorTheme'
'workbench.preferredDarkColorTheme'
'workbench.preferredHighConstrastColorTheme'

  • auto switching happens when
    • event is received and 'window.autoDetectColorScheme' is true
    • a change to the preferred scheme is detected on startup and 'window.autoDetectColorScheme' is true
    • an active preferred theme is changed and 'window.autoDetectColorScheme' is true

'window.autoDetectColorScheme' is currently off by default.

Thanks @muuvmuuv for the great work! Feel free to add improvements on top of this PR.

@aeschli aeschli self-assigned this Dec 19, 2019
@aeschli aeschli added this to the December/January 2020 milestone Dec 19, 2019
@puff
Copy link

puff commented Dec 19, 2019

where's the santa hat

@aeschli aeschli added the themes Color theme issues label Dec 19, 2019
@aeschli aeschli merged commit 139e59f into master Dec 19, 2019
@aeschli aeschli deleted the aeschli/detectOSColorSchemeChanges branch December 19, 2019 15:29
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
themes Color theme issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[themes] setting for preferred light and dark color theme based on system dark mode setting (Windows/Mac)
2 participants