Skip to content

Instantly share code, notes, and snippets.

@davetrux

davetrux/Darkmode.js

Created Oct 21, 2019
Embed
What would you like to do?
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