Skip to content

Conversation

Saurabhsing21
Copy link

What kind of change does this PR introduce?

bugfix: prevent FOUC by syncing initial theme and CSS vars

Issue Number:
#160

videos:

Screen.Recording.2025-10-01.at.2.36.20.AM.mov
Screen.Recording.2025-10-01.at.2.53.17.AM.mov

If relevant, did you update the documentation?

Summary
bugfix: prevent FOUC by syncing initial theme and CSS vars

Resolved the "flash of unstyled content" (FOUC) by adding a script to set the color mode before the page renders.

Fixed multiple hydration errors and invalid CSS selectors for a more stable and predictable UI.

Does this PR introduce a breaking change?
No

- Added ColorModeScript (kept in body) to apply color mode before first pain
- Replace invalid CSS selectors

Signed-off-by: Saurabhsing21 <saurabhsingh881888@gmail.com>
@Saurabhsing21
Copy link
Author

@JeelRajodiya pls review this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant