-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-123430: Add dark mode support to pages generated by http.server #123475
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
Conversation
The error pages and the directory lists generated by http.server did not allow browsers to enable the inbuilt dark mode. This change allows for that by setting the css property color-scheme properly.
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Misc/NEWS.d/next/Library/2024-08-29-14-51-36.gh-issue-123430.M7wXl9.rst
Outdated
Show resolved
Hide resolved
…7wXl9.rst Co-authored-by: Peter Bierma <[email protected]>
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.
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.
I cannot review the CSS, but I like @hugovk's screenshots and the feature.
Misc/NEWS.d/next/Library/2024-08-29-14-51-36.gh-issue-123430.M7wXl9.rst
Outdated
Show resolved
Hide resolved
Should this get backported? The user seeing the incorrect color scheme sounds like a bug to me. |
It's a new feature, it should not be backported. |
@YorikHansen Please could you also mention this in What's New? https://docs.python.org/3.14/whatsnew/3.14.html#improved-modules |
Thank you! |
The error pages and the directory lists generated by http.server did not allow browsers to enable the inbuilt dark mode. This change allows for that by setting the css property color-scheme properly.
:root { color-scheme: light dark; }
to http.server directory list and error pages #123430