Skip to content

fix:fixed Flash of light screen issue (FOUC) - #184

Merged
JeelRajodiya merged 5 commits into
json-schema-org:mainfrom
Saurabhsing21:issue160
Nov 2, 2025
Merged

fix:fixed Flash of light screen issue (FOUC)#184
JeelRajodiya merged 5 commits into
json-schema-org:mainfrom
Saurabhsing21:issue160

Conversation

@Saurabhsing21

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

@JeelRajodiya pls review this

@JeelRajodiya

Copy link
Copy Markdown
Member

Thanks for the PR @Saurabhsing21. I'll review it shortly.

@JeelRajodiya
JeelRajodiya merged commit 904f6fc into json-schema-org:main Nov 2, 2025
1 check passed
@JeelRajodiya

Copy link
Copy Markdown
Member

Nicely done @Saurabhsing21. Thanks!

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.

2 participants