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

Add light/dark mode #69

Closed
KyleMit opened this issue Sep 18, 2019 · 0 comments
Closed

Add light/dark mode #69

KyleMit opened this issue Sep 18, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@KyleMit
Copy link
Member

KyleMit commented Sep 18, 2019

Can also tap into @media (prefers-color-scheme) | caniuse

And can detect changes with matchMedia with addListener | caniuse

var colorSchemeMQ = window.matchMedia('(prefers-color-scheme: dark)')
colorSchemeMQ.addListener(function() {
	console.log(colorSchemeMQ.matches)
})
@KyleMit KyleMit added the enhancement New feature or request label Sep 18, 2019
KyleMit added a commit that referenced this issue Oct 13, 2019
@KyleMit KyleMit self-assigned this Dec 20, 2019
@KyleMit KyleMit closed this as completed Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant