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

Improve theme performance #135

Merged
merged 8 commits into from
Jul 10, 2021
Merged

Improve theme performance #135

merged 8 commits into from
Jul 10, 2021

Conversation

laymonage
Copy link
Member

  • Remove unused CSS variables (fix Drop unused CSS variables #48)
  • Target main element directly instead of using a data-theme attribute selector to prevent flashing between CSS loads
  • Keep previous theme until the new one is loaded (also to prevent flashing)
  • Extract useTheme hook from App component
  • Add custom _document.tsx to load the initial CSS

@vercel
Copy link

vercel bot commented Jul 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/laymonage/giscus/AsRVDiJMmF9QVf4TiWymjmnvDmA1
✅ Preview: https://giscus-git-improve-theme-perf-laymonage.vercel.app

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.

Drop unused CSS variables
1 participant