Support dark color-scheme

This patch updates the html documentation to add the color-scheme meta
element, signaling ligth and dark color scheme support, and updating the
inline CSS styles to override some colors when dark mode is active, to
make sure that the document is always readable.

I've also cleaned up a bit the CSS styles, but without functional
changes.
This commit is contained in:
Andrea Pappacoda 2023-01-07 22:56:16 +01:00 committed by Howard Hinnant
parent 88d9e5ceff
commit 8eeae97520
7 changed files with 55 additions and 75 deletions

View File

@ -4,20 +4,17 @@
<head> <head>
<title>chrono_io</title> <title>chrono_io</title>
<meta name="color-scheme" content="light dark" />
<style> <style>
p {text-align:justify} li, p {text-align:justify}
li {text-align:justify}
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
ins {color:#00A000} ins {color:#00A000}
del {color:#A00000} del {color:#A00000}
code {white-space:pre;} code {white-space:pre;}
@media (prefers-color-scheme: dark)
{
ins {color:#88FF88}
del {color:#FF5555}
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -3,19 +3,11 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="color-scheme" content="light dark">
<title>Extending &lt;chrono&gt; to Calendars and Time Zones</title> <title>Extending &lt;chrono&gt; to Calendars and Time Zones</title>
<style type="text/css"> <style type="text/css">
p {text-align:justify} li, p {text-align:justify}
li {text-align:justify} blockquote.note, p.note
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
p.note
{ {
background-color:#E0E0E0; background-color:#E0E0E0;
padding-left: 15px; padding-left: 15px;
@ -25,11 +17,17 @@
} }
ins {color:#00A000} ins {color:#00A000}
del {color:#A00000} del {color:#A00000}
address {text-align:right;} address {text-align:right;}
h1 {text-align:center;} h1 {text-align:center;}
span.comment {color:#C80000;}
code {white-space:pre;} code {white-space:pre;}
@media (prefers-color-scheme: dark)
{
blockquote.note, p.note {background-color:#505050}
ins {color:#88FF88}
del {color:#FF5555}
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -4,20 +4,17 @@
<head> <head>
<title>date</title> <title>date</title>
<meta name="color-scheme" content="light dark" />
<style> <style>
p {text-align:justify} li, p {text-align:justify}
li {text-align:justify}
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
ins {color:#00A000} ins {color:#00A000}
del {color:#A00000} del {color:#A00000}
code {white-space:pre;} code {white-space:pre;}
@media (prefers-color-scheme: dark)
{
ins {color:#88FF88}
del {color:#FF5555}
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -4,20 +4,17 @@
<head> <head>
<title>islamic</title> <title>islamic</title>
<meta name="color-scheme" content="light dark" />
<style> <style>
p {text-align:justify} li, p {text-align:justify}
li {text-align:justify}
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
ins {color:#00A000} ins {color:#00A000}
del {color:#A00000} del {color:#A00000}
code {white-space:pre;} code {white-space:pre;}
@media (prefers-color-scheme: dark)
{
ins {color:#88FF88}
del {color:#FF5555}
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -4,20 +4,17 @@
<head> <head>
<title>iso_week</title> <title>iso_week</title>
<meta name="color-scheme" content="light dark" />
<style> <style>
p {text-align:justify} li, p {text-align:justify}
li {text-align:justify}
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
ins {color:#00A000} ins {color:#00A000}
del {color:#A00000} del {color:#A00000}
code {white-space:pre;} code {white-space:pre;}
@media (prefers-color-scheme: dark)
{
ins {color:#88FF88}
del {color:#FF5555}
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -4,20 +4,17 @@
<head> <head>
<title>julian</title> <title>julian</title>
<meta name="color-scheme" content="light dark" />
<style> <style>
p {text-align:justify} li, p {text-align:justify}
li {text-align:justify}
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
ins {color:#00A000} ins {color:#00A000}
del {color:#A00000} del {color:#A00000}
code {white-space:pre;} code {white-space:pre;}
@media (prefers-color-scheme: dark)
{
ins {color:#88FF88}
del {color:#FF5555}
}
</style> </style>
</head> </head>
<body> <body>

17
tz.html
View File

@ -4,20 +4,17 @@
<head> <head>
<title>Time Zone Database Parser</title> <title>Time Zone Database Parser</title>
<meta name="color-scheme" content="light dark" />
<style> <style>
p {text-align:justify} li, p {text-align:justify}
li {text-align:justify}
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
ins {color:#00A000} ins {color:#00A000}
del {color:#A00000} del {color:#A00000}
code {white-space:pre;} code {white-space:pre;}
@media (prefers-color-scheme: dark)
{
ins {color:#88FF88}
del {color:#FF5555}
}
</style> </style>
</head> </head>
<body> <body>