[PATCH] css: Optional support for dark mode

Jason A. Donenfeld Jason at zx2c4.com
Mon Jan 2 00:51:55 UTC 2023


Hi Samuel,

On Sun, Jan 1, 2023 at 10:41 PM Samuel Lidén Borell <samuel at kodafritt.se> wrote:
>
> Modern browsers have a "dark mode" preference, which enables alternate
> CSS rules on web sites that support this.
>
> This patch adds an optional dark color scheme, that can be copied into
> cgit.css. The color scheme is then auto-detected via a @media query.
>
> Note that filters that use color (such as source highlighters), and
> logotypes, may need to be updated to work with a black background. So
> this goes into a separate file, that can be copied into cgit.css for
> those who want to enable support for dark mode.

Rather, let's just include this in the default cgit.css file, people
will just fix whatever source filters being used. That means the ones
in-tree should be updated first. Specifically, syntax-highlighting.py
and maybe even syntax-highlighting.sh should be updated.

Jason


More information about the CGit mailing list