mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-10 14:02:57 +00:00
Improve theme handling when JS is disabled
This commit is contained in:
parent
c056928af2
commit
ca5c6f6c26
@ -204,7 +204,7 @@ details[open] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Expanding the mdBook theme*/
|
/* Expanding the mdBook theme*/
|
||||||
.light {
|
.light, body:not([class]) {
|
||||||
--inline-code-bg: #f6f7f6;
|
--inline-code-bg: #f6f7f6;
|
||||||
}
|
}
|
||||||
.rust {
|
.rust {
|
||||||
@ -220,6 +220,16 @@ details[open] {
|
|||||||
--inline-code-bg: #191f26;
|
--inline-code-bg: #191f26;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([class]) {
|
||||||
|
/*
|
||||||
|
In case JS is disabled and the user's system is in dark mode, we take "coal" as default
|
||||||
|
dark theme.
|
||||||
|
*/
|
||||||
|
--inline-code-bg: #1d1f21;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#settings-dropdown {
|
#settings-dropdown {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin: 0.7em;
|
margin: 0.7em;
|
||||||
|
Loading…
Reference in New Issue
Block a user