File tree Expand file tree Collapse file tree
src/crate/theme/rtd/crate/static Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22@import " layout" ;
33@import " furo" ;
44@import " page-tools" ;
5- @import " colors" ;
Original file line number Diff line number Diff line change 1111 @include default-admonition (#651fff , " abstract" )
1212 @include default-topic (#14B8A6 , " pencil" )
1313
14+ @include colors
15+
16+ .only-light
17+ display : block !important
18+ html body .only-dark
19+ display : none !important
20+
21+ // Ignore dark-mode hints if print media.
22+ @media not print
23+ // Enable dark-mode, if requested.
24+ body [data-theme="dark"]
25+ @include colors-dark
26+
27+ html & .only-light
28+ display : none !important
29+ .only-dark
30+ display : block !important
31+
32+ // Enable dark mode, unless explicitly told to avoid.
33+ @media (prefers-color-scheme : dark )
34+ body :not ([data-theme = " light" ])
35+ @include colors-dark
36+
37+ html & .only-light
38+ display : none !important
39+ .only-dark
40+ display : block !important
41+
42+ //
43+ // Theme toggle presentation
44+ //
45+ body [data-theme="auto"]
46+ .theme-toggle svg .theme-icon-when-auto-light
47+ display : block
48+
49+ @media (prefers-color-scheme : dark )
50+ .theme-toggle svg .theme-icon-when-auto-dark
51+ display : block
52+ .theme-toggle svg .theme-icon-when-auto-light
53+ display : none
54+
55+ body [data-theme="dark"]
56+ .theme-toggle svg .theme-icon-when-dark
57+ display : block
58+
59+ body [data-theme="light"]
60+ .theme-toggle svg .theme-icon-when-light
61+ display : block
Original file line number Diff line number Diff line change 55@import " spacing"
66@import " icons"
77@import " admonitions"
8- // @import "colors"
8+ @import " colors"
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ body[data-theme="light"] {
2121 }
2222}
2323
24- [ data-theme = " light " ] {
24+ @mixin colors {
2525 // API documentation
2626 --color-api-background : var (--color-background-hover--transparent );
2727 --color-api-background-hover : var (--color-background-hover );
@@ -175,7 +175,7 @@ body[data-theme="light"] {
175175 --link-toc : #000 ;
176176}
177177
178- [ data-theme = " dark" ] {
178+ @mixin colors- dark {
179179 // API documentation
180180 --color-api-background : var (--color-background-hover--transparent );
181181 --color-api-background-hover : var (--color-background-hover );
You can’t perform that action at this time.
0 commit comments