Skip to content

Instantly share code, notes, and snippets.

@vdeantoni
Created April 26, 2020 05:43
Show Gist options
  • Select an option

  • Save vdeantoni/c3edceb4fc577eeee9794c9d322be4a6 to your computer and use it in GitHub Desktop.

Select an option

Save vdeantoni/c3edceb4fc577eeee9794c9d322be4a6 to your computer and use it in GitHub Desktop.
dark-mode-2
module.exports = {
theme: {
extend: {
screens: {
light: { raw: "(prefers-color-scheme: light)" },
dark: { raw: "(prefers-color-scheme: dark)" }
}
}
},
plugins: [
function({ addBase, config }) {
addBase({
body: {
color: config("theme.colors.black"),
backgroundColor: config("theme.colors.white")
},
"@screen dark": {
body: {
color: config("theme.colors.white"),
backgroundColor: config("theme.colors.black")
}
}
});
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment