-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its execution
Description
🐛 Bug Report
Assuming colorMode.respectPrefersColorScheme is set to true,
- when
colorMode.disableSwitchisfalse, the color theme changes dynamically when the OS setting is changed, without requiring a full page reload. - when
colorMode.disableSwitchistrue, this behavior doesn't work. Instead, the user has to reload the page for the correct color theme to kick in.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
- Set
colorMode.respectPrefersColorSchemetotrue - Set
colorMode.disableSwitchto true - Make sure your localStorage is empty
- Change your OS color theme preference, the color theme of Docusaurus is not dyamically updated
Expected behavior
The color theme should change dynamically.
Actual Behavior
🎥 observed behavior
🎥 behavior when toggle is on (for comparison)
🎥 expected behavior
Your Environment
N/A
Reproducible Demo
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its execution