Closed
Description
Repro:
- Clear local-storage for doc.rust-lang.org
- Set system theme to light
- Visit https://doc.rust-lang.org/stable/std/ and change theme to
ayu
- Visit https://doc.rust-lang.org/nightly/std/ and note that the theme has been set to
light
following the system - Visit https://doc.rust-lang.org/stable/std/ and see that the theme changes back to
ayu
because the stored theme was never updated - Visit https://doc.rust-lang.org/nightly/std/ and then change the system theme to dark, updating the displayed theme to
ayu
, and then change the system theme back to light, updating the displayed theme tolight
- Visit https://doc.rust-lang.org/stable/std/ and see that the theme is now
light
because the stored theme was updated
This affects the plan we have for docs.rs to follow rustdoc's theme setting, rust-lang/docs.rs#1116 (comment), I assumed that rustdoc would update the stored theme whenever it changes so we could synchronize off that. Missing the initial setting based on the fact that light
is the "default" theme loaded before the JS runs seems like a bug.
cc @nasso,