Skip to content

Instantly share code, notes, and snippets.

@pigeonfresh
Created April 15, 2021 09:21
Show Gist options
  • Save pigeonfresh/52612bfb444513c4ec4f31ac05446844 to your computer and use it in GitHub Desktop.
Save pigeonfresh/52612bfb444513c4ec4f31ac05446844 to your computer and use it in GitHub Desktop.
@mixin light-color-scheme {
background: #fff;
color: #111;
}
@mixin dark-color-scheme {
background: #111;
color: #fff;
}
@mixin color-scheme {
@include light-color-scheme;
&.inverted-color-scheme {
@include dark-color-scheme;
}
@media (prefers-color-scheme: dark) {
@include dark-color-scheme;
&.inverted-color-scheme {
@include light-color-scheme;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment