-
-
Notifications
You must be signed in to change notification settings - Fork 836
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: respect user theme preference #4033
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
The reason auto is used is so that the JavaScript code can determine whether to use the user-preference or user browser color scheme.
If data-theme
can no longer be auto
it would undo that logic (see the setColorScheme
method).
@SychO9 The logic behind auto is still preserved. If |
Before:output2.mp4After:output.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, you're absolutely right!
Co-authored-by: Sami Mazouz <[email protected]>
Co-authored-by: Sami Mazouz <[email protected]>
This PR fixes the issue where
data-theme
defaulted toauto
, causing a flash of light mode before switching to dark. It ensures the theme respects the user's preference for a smoother experience.Fixes #0000
Changes proposed in this pull request:
Reviewers should focus on:
Screenshot
QA
Necessity
Confirmed
composer test
).Required changes: