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

fix: theme color flickering w/ critters #191

Merged
merged 1 commit into from
Sep 14, 2021
Merged

fix: theme color flickering w/ critters #191

merged 1 commit into from
Sep 14, 2021

Conversation

johannschopplich
Copy link
Contributor

@johannschopplich johannschopplich commented Sep 14, 2021

The script at the end of <body> to handle light/dark theming is called when the inlined CSS styles have already been loaded. This sometimes leads to flickering.

With this change, the script to set theme mode will always be called first, since critter embeds the CSS at the end of <head>. What do you think?

@antfu antfu merged commit 96af6b8 into antfu-collective:main Sep 14, 2021
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