-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Code blocks flashes in dark mode #11566
Copy link
Copy link
Open
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 executionexternalThis issue is caused by an external dependency and not Docusaurus.This issue is caused by an external dependency and not Docusaurus.
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 executionexternalThis issue is caused by an external dependency and not Docusaurus.This issue is caused by an external dependency and not Docusaurus.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
When loading a Docusaurus page in dark mode, code blocks briefly flash with light theme colours before switching to the correct dark theme colours. This creates a jarring visual experience.
Reproducible demo
Can reproduce on any official page, https://docusaurus.io/docs/configuration
Steps to reproduce
Expected behavior
Code blocks should immediately display with the dark theme colours when the page loads in dark mode.
Actual behavior
Code blocks briefly display with light theme colours (a white background and light syntax highlighting), then quickly switch to dark theme colours. This flash is very noticeable and disrupts the user experience.
Your environment
N/A
Self-service