Skip to content

Commit

Permalink
Don't set display: block on visible only-* elements
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Feb 10, 2022
1 parent 9dfaa53 commit a869dec
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/furo/assets/styles/base/_theme.sass
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,24 @@ body

@include colors

.only-light
display: block !important
.only-dark
display: none !important
body:not[data-theme]
.only-dark
display: none !important

// Enable dark-mode, if requested.
body[data-theme="dark"]
@include colors-dark

.only-light
html & .only-light
display: none !important
.only-dark
display: block !important

// Enable dark mode, unless explicitly told to avoid.
@media (prefers-color-scheme: dark)
body:not([data-theme="light"])
@include colors-dark

.only-light
html & .only-light
display: none !important
.only-dark
display: block !important

//
// Theme toggle presentation
Expand Down

0 comments on commit a869dec

Please sign in to comment.