Skip to content

Commit

Permalink
Add utility classes to hide content on a specific color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
meduzen committed Nov 18, 2023
1 parent bde3b65 commit 78d12ae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions vitepress/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,17 @@ kbd {
.custom-block:target {
outline: currentColor solid;
}

/* Make only visible under specific conditions */

@media not (prefers-color-scheme: dark) {
.only-when-dark {
display: none;
}
}

@media not (prefers-color-scheme: light) {
.only-when-light {
display: none;
}
}

0 comments on commit 78d12ae

Please sign in to comment.