Skip to content

perf: dark mode causes flash of light content on first load #460

Description

@nanaf6203-bit

Summary

ThemeSwitcher flips between light/dark via className, causing a First Contentful Paint flash.

Affected area

src/components/ThemeSwitcher.tsx, src/components/ThemeProvider.tsx

Steps to reproduce

Hard reload dark mode → flash of light content.

Expected behaviour

Inline an asynchronous script in <head> that sets the theme before paint.

Acceptance criteria

  • Eliminate FOUC; CWV CLS = 0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programperformancePerformance / bundle / runtimepriority/p1P1 — high priority, fix soonuxUser experience and interaction quality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions