- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-rustdoc-themesArea: Themes for HTML pages generated by rustdocArea: Themes for HTML pages generated by rustdocA-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
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 lightfollowing the system
- Visit https://doc.rust-lang.org/stable/std/ and see that the theme changes back to ayubecause 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 lightbecause 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,
nasso
Metadata
Metadata
Assignees
Labels
A-rustdoc-themesArea: Themes for HTML pages generated by rustdocArea: Themes for HTML pages generated by rustdocA-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.