[PATCH] Add support for dark color scheme in default index.html page
Steffen Weber
steffen.weber at gmail.com
Sun Aug 15 05:59:56 UTC 2021
You could add the following line which makes modern browsers use colors
from their built-in dark color scheme:
<meta name="color-scheme" content="light dark">
https://web.dev/color-scheme/
Am So., 15. Aug. 2021 um 03:25 Uhr schrieb Maxim Dounin <mdounin at mdounin.ru
>:
> Hello!
>
> On Sat, Aug 14, 2021 at 08:10:07AM -0700, Duncan Lock wrote:
>
> > # HG changeset patch
> > # User Duncan Lock <duncan.lock at gmail.com>
> > # Date 1628952253 25200
> > # Sat Aug 14 07:44:13 2021 -0700
> > # Node ID 81294b370e774c792210904f710abc0a494c5c05
> > # Parent dda421871bc213dd2eb3da0015d6228839323583
> > Add support for dark color scheme in default index.html page
> >
> > Add a little CSS to index.html to support dark color schemes.
> > This will display the index page in dark colors if the user has
> > requested a dark color scheme in their system UI or browser, and
> > display the same as the previous version if not.
> >
> > See:
> https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
> >
> > diff -r dda421871bc2 -r 81294b370e77 docs/html/index.html
> > --- a/docs/html/index.html Tue Aug 10 23:43:17 2021 +0300
> > +++ b/docs/html/index.html Sat Aug 14 07:44:13 2021 -0700
> > @@ -8,6 +8,15 @@
> > margin: 0 auto;
> > font-family: Tahoma, Verdana, Arial, sans-serif;
> > }
> > + @media (prefers-color-scheme: dark) {
> > + body {
> > + background-color: #363839;
> > + color: #d1cec9;
> > + }
> > + a {
> > + color: #c4c4ff;
> > + }
> > + }
> > </style>
> > </head>
> > <body>
>
> Thank you for the patch. I don't think this is something we want
> to customize in the example pages such as index.html, especially
> given that we don't set other colors.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20210815/2f5dec1a/attachment.htm>
More information about the nginx-devel
mailing list