:: Re: [DNG] Darkmode, on Devuan homep…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: onefang
Fecha:  
A: dng
Asunto: Re: [DNG] Darkmode, on Devuan homepage?
On 2025-12-24 11:31:10, onefang wrote:
> On 2025-12-23 19:45:41, Amin Bandali via Dng wrote:
> > Hello,
> >
> > FYI adding support for light/dark mode could in principle be as easy
> > as adding the following to the HTML <head>:
> >
> >     <meta name="color-scheme" content="light dark">

> >
> > This will tell browsers that support this (e.g. Firefox or Chromium)
> > to use a light or dark theme based on the user preference.
> > These days, both Firefox and Chromium have fairly decent colours
> > defined for light and dark mode out of the box, so you may not even
> > need to make much changes in your CSS.
> >
> > That said, you *can* set styles based on whether light or dark mode is
> > active using a media query like so:
> >
> >     body { background-color: #edffed }

> >
> >     @media (prefers-color-scheme: dark) {
> >       body { background-color: #222 }
> >     }

> >
> > With the above, we set the normal background-color for body to a
> > bright #edffed color, and if dark mode is active we use a dark #222
> > color instead.
> >
> > You may find this MDN article useful:
> >
> > https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme
> >
> > Hope this helps.
>
> I'm trying this out now, looks good so far.
>
> One problem is that privacy type browsers might disable that when they
> disable fingerprinting, LibreWolf did. Worked with that fingerprinting
> protection thing turned off.
>
> Doesn't seem to work on Falkon, and I haven't found any preference item
> that might make it work.


Ah Falkon is prefering light theme, perhaps coz something deeper in QT
said so. I haven't stumbled across what that is, but I'm just gonna use
Falkon as my "defaults to light theme" test browser. Dillo is my
"Ignores all of that fancy stuff, just falls back to normal" test browser.

Let's see if I can combine this with my sunglasess icon on nYAW.