Add blocking script in HTML head to apply theme before React hydration. This eliminates the flash of wrong theme (FOUT) that occurred when the page loaded with default theme before useEffect could apply the saved theme. The script: - Runs synchronously before page render - Reads theme from localStorage - Applies dark/light class to <html> element immediately - Handles system theme preference detection - Wrapped in try-catch for safety This ensures users see the correct theme from the first paint, with no flicker. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.5 KiB
1.5 KiB