Last active
October 8, 2019 19:31
-
-
Save glued/83b401ad2ff6c05c15cc60944a4aaeb2 to your computer and use it in GitHub Desktop.
Check for OS Dark Theme in the browser
This file contains 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
const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment