Skip to content

Add simple dark mode to http.server directory list and error pages #95812

Closed as not planned
@marvinruder

Description

@marvinruder

Feature or enhancement

A simple dark mode in http.server’s directory list and error pages, using white font on black background.

Pitch

To make the directory lists and error pages of the simple HTTP server from http.server more readable in dark environments, a simple dark mode support using a few lines of CSS could enhance user experience. I propose the following CSS code, which uses white font on black background when requested by the browser:

<style type="text/css">
@media (prefers-color-scheme: dark) {
  body {
    background-color: #000;
    color: #fff;
  }
}
</style>

Previous discussion

see https://discuss.python.org/t/add-simple-dark-mode-to-http-server-directory-list/18081

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions