Skip to content

Commit

Permalink
refactor(color-scheme): reduce complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd authored and mdo committed Apr 14, 2021
1 parent 5a9440d commit 4383ae0
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions scss/mixins/_color-scheme.scss
@@ -1,17 +1,7 @@
// scss-docs-start mixin-color-scheme
@mixin color-scheme($name) {
@if $name == dark {
@media (prefers-color-scheme: dark) {
@content;
}
} @else if $name == light {
@media (prefers-color-scheme: light) {
@content;
}
} @else {
@media (prefers-color-scheme: #{$name}) {
@content;
}
@media (prefers-color-scheme: #{$name}) {
@content;
}
}
// scss-docs-end mixin-color-scheme

0 comments on commit 4383ae0

Please sign in to comment.