Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

🐛 Fixed flash of unstyled content appearing when toggling night mode #1818

Merged
merged 2 commits into from
Jan 12, 2021

Commits on Jan 9, 2021

  1. 🐛 Fixed flash of unstyled content appearing when toggling night mode

    closes #12396
    We use two stylesheets ghost-light.css and ghost-dark.css for light mode and night mode respectively.
    The problem occurs when we disable the light stylesheet when we enable dark stylesheet, as there is a moment when there is no style applied
    This causes flash of unstyled content (or a big logo when users flip the night mode switch)
    
    Since the ghost-dark style is loaded after the ghost-light stylesheet, we only need to enable or disable the dark stylesheet.
    When the dark stylesheet is enabled, the light stylesheet will be overridden automatically by the browser.
    I could not find any performance implications on overriding styles. The only performance implication is around loading a new stylesheet
    which we already do.
    harshmaur committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    3d4060f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1 from harshmaur/fix/night-mode-fouc

    🐛 Fixed flash of unstyled content appearing when toggling night mode
    harshmaur committed Jan 9, 2021
    Configuration menu
    Copy the full SHA
    d0c1c77 View commit details
    Browse the repository at this point in the history