Skip to content

Support OS theme auto-sync #477

Merged
emdevelopa merged 2 commits intoemdevelopa:mainfrom
deedee-code:feat/theme-auto-sync
Mar 29, 2026
Merged

Support OS theme auto-sync #477
emdevelopa merged 2 commits intoemdevelopa:mainfrom
deedee-code:feat/theme-auto-sync

Conversation

@deedee-code
Copy link
Copy Markdown
Contributor

Description

This PR implements system-level theme detection and prevents the flash of unstyled content (FOUC) on load:

  • Updated ThemeProvider: Enabled enableSystem and set defaultTheme="system" to respect OS preferences on first load.
  • Injected Theme Script: Added a blocking inline script in the root HTML to apply the correct theme class before the page renders, eliminating the "theme flash."
  • Improved Theme Sync: Refactored the theme detection logic to correctly handle the 'system' value from localStorage in sync with the user's OS settings.

Closes: #425

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

@deedee-code is attempting to deploy a commit to the Emmanuel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@deedee-code Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@emdevelopa emdevelopa merged commit 698eb18 into emdevelopa:main Mar 29, 2026
2 of 3 checks passed
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.

[FE] Support for 'Dark/Light' Auto-Sync with OS

2 participants