Created
October 21, 2019 20:11
-
-
Save davetrux/4cc324b687202c09846c60175a45964b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { | |
// dark mode | |
console.log('dark mode') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment