-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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 executionhelp wantedAsking for outside help and/or contributions to this particular issue or PR.Asking for outside help and/or contributions to this particular issue or PR.
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
I'm using window.print() to print preview the docs I created. While doing tests, I noticed that when print preview is opened either with window.print() or ctrl+p, the docusaurus site is switched to the dark mode by itself in Chrome browser. I tested it on two different computers and the result is the same. The storage theme value remains in light but for some reason the site goes dark mode.
This only happens if your system wide dark mode setting is on.
Steps to reproduce
- Turn OS dark mode setting on
- Get into any docusaurus site (https://docusaurus.io/showcase) with Chrome browser
- Press ctrl+p or write window.print() in console
Expected behavior
The theme of the site should not change.
Actual behavior
The theme of the site goes dark mode if it were set light to mode.
Your environment
- Public source code:
- Public site URL:
- Docusaurus version used: 2.0.0-beta.15
- Environment name and version: Chrome: Version 97.0.4692.99, Node: 16.13.1
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 10 & Windows 11
Reproducible demo
Self-service
- I'd be willing to fix this bug myself.
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 executionhelp wantedAsking for outside help and/or contributions to this particular issue or PR.Asking for outside help and/or contributions to this particular issue or PR.