-
Notifications
You must be signed in to change notification settings - Fork 16.7k
fix(loading): improve loading screen theming for dark mode support #35129
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
Changes from all commits
866ecd4
90bebef
86a19a7
951b48d
1faaa21
032abe7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,20 @@ | |
|
|
||
| {% block head_meta %}{% endblock %} | ||
|
|
||
| <style> | ||
| body { | ||
| background: #fff; | ||
| color: #000; | ||
| } | ||
|
|
||
| @media (prefers-color-scheme: dark) { | ||
| body { | ||
| background: #000; | ||
| color: #fff; | ||
| } | ||
| } | ||
| </style> | ||
|
Comment on lines
+33
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant CSS causing style conflicts
Tell me moreWhat is the issue?Inline CSS in the head creates redundant style application that conflicts with existing theme-based styling on the body element. Why this mattersThe body element already has inline styling with theme tokens ( Suggested change ∙ Feature PreviewRemove the inline <body style="margin: 0; padding: 0; background-color: {{ tokens.get('colorBgBase', '#ffffff') }}; color: {{ tokens.get('colorTextBase', '#000000') }};">Provide feedback to improve future suggestions💬 Looking for more details? Reply to this comment to chat with Korbit. |
||
|
|
||
| {% block head_css %} | ||
| {% for favicon in favicons %} | ||
| <link | ||
|
|
@@ -85,14 +99,10 @@ | |
| <!-- Custom URL from theme --> | ||
| <img | ||
| src="{{ tokens.brandSpinnerUrl }}" | ||
| alt="Loading..." | ||
msyavuz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| alt="" | ||
| aria-label="Loading" | ||
| style="{{ spinner_style }}" | ||
| /> | ||
| {% else %} | ||
| <!-- Fallback: This should rarely happen with new logic --> | ||
| <div style="{{ spinner_style }}"> | ||
| Loading... | ||
| </div> | ||
| {% endif %} | ||
| </div> | ||
| {% endblock %} | ||
|
|
||
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.
fix for a flaky test