Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: avoid FOUC for theme #178

Merged
merged 1 commit into from
Dec 13, 2023
Merged

docs: avoid FOUC for theme #178

merged 1 commit into from
Dec 13, 2023

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Dec 13, 2023

There's a FOUC when visiting the page with a non-default theme.

This is because the Theme component is inside the index.svelte file; the JS has to be parsed before it's executed.

A much faster way is to inline a script that synchronously sets the persisted theme.

@metonym metonym merged commit 7e6ac50 into master Dec 13, 2023
3 checks passed
@metonym metonym deleted the docs-fouc branch December 13, 2023 01:32
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