Skip to content

fix(theme): prevent FOUC with blocking stylesheet injection#14

Merged
lostmygithubaccount merged 1 commit into
mainfrom
cody/ws-sitefix
Apr 4, 2026
Merged

fix(theme): prevent FOUC with blocking stylesheet injection#14
lostmygithubaccount merged 1 commit into
mainfrom
cody/ws-sitefix

Conversation

@lostmygithubaccount
Copy link
Copy Markdown
Member

Summary

  • Replace static <link> stylesheet with blocking document.write injection in <head> to prevent flash of unstyled/wrong-theme content
  • Add <noscript> fallback for non-JS environments
  • Matches zorto v0.16.0 built-in theme FOUC fix (#41)

🤖 Generated with Claude Code

Use document.write to inject the stylesheet link in a blocking <script>
so the correct theme CSS loads before the page renders. Matches the
zorto v0.16.0 built-in theme fix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 4, 2026

Deploy Preview for dkdcio ready!

Name Link
🔨 Latest commit 3e88084
🔍 Latest deploy log https://app.netlify.com/projects/dkdcio/deploys/69d0be22f16eae0008cc81ef
😎 Deploy Preview https://deploy-preview-14--dkdcio.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lostmygithubaccount lostmygithubaccount merged commit 3d46d1b into main Apr 4, 2026
5 checks passed
@lostmygithubaccount lostmygithubaccount deleted the cody/ws-sitefix branch April 6, 2026 00:31
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