[PATCH RESEND v2] css: Support for dark mode

Samuel Lidén Borell samuel at kodafritt.se
Thu Jan 12 00:33:05 UTC 2023


Oops. I made a last minute change of the themes, and that broke things. Looks like some theme combinations don't work well.

I will send an updated patch with a working theme combo + a comment about this.

It could also be solved by also wrapping the light theme in a media query, but then older browsers will not show the highlighting.

Regards,
Samuel


On Wed, 11 Jan 2023 21:56:30 +0100, "Jason A. Donenfeld" <Jason at zx2c4.com> wrote:

> It looks like the issue is that the string class for the light theme is:
> 
> .highlight .s {
>     color: #dd2200;
>     background-color: #fff0f0;
> }
> 
> But for the dark theme it's:
> 
> @media (prefers-color-scheme: dark)
> .highlight .s {
>     color: #e6db74;
> }
> 
> And so it winds up using the dark color, but with the light
> background, because the dark theme doesn't specify a background.


More information about the CGit mailing list