Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
(Contributed by Serhiy Storchaka in :gh:`82017`.)
+http
+----
+
+Directory lists and error pages generated by the :mod:`http.server`
+module allow the browser to apply its default dark mode.
+(Contributed by Yorik Hansen in :gh:`123430`.)
+
+
json
----
<html lang="en">
<head>
<meta charset="utf-8">
+ <style type="text/css">
+ :root {
+ color-scheme: light dark;
+ }
+ </style>
<title>Error response</title>
</head>
<body>
r.append('<html lang="en">')
r.append('<head>')
r.append(f'<meta charset="{enc}">')
+ r.append('<style type="text/css">\n:root {\ncolor-scheme: light dark;\n}\n</style>')
r.append(f'<title>{title}</title>\n</head>')
r.append(f'<body>\n<h1>{title}</h1>')
r.append('<hr>\n<ul>')
--- /dev/null
+Pages generated by the :mod:`http.server` module allow the browser to apply its default dark mode.