List for cgit developers and users
 help / color / mirror / Atom feed
From: "Samuel Lidén Borell" <samuel@kodafritt.se>
To: cgit@lists.zx2c4.com
Subject: Re: [PATCH v3] css: Support for dark mode
Date: Sun, 22 Jan 2023 14:04:37 +0100	[thread overview]
Message-ID: <20230122140437.4b530f77458029e4ae43c229@kodafritt.se> (raw)
In-Reply-To: <20230122122519.3D50F13F@badger.kodafritt.se>

On Sun, 22 Jan 2023 12:35:09 +0100, Samuel Lidén Borell <samuel@kodafritt.se> wrote:

> Modern browsers have a "dark mode" preference, which enables alternate
> styles on web sites that support this.
> 
> This patch adds a dark color scheme, that is automatically activated
> via a CSS @media query.
> 
> Older browsers that do not support color schemes will simply show the
> light scheme, but possibly without syntax highlighting.
> 
> Note that filters that use color (such as source highlighters) and
> logotypes may need to be updated to work with a black background!
> See the updated files in the filters/ directory.

Just a description of the changes from the previous version of the patch:

* Improved the dark color scheme
* Fixed white pixels around code blocks in markdown pages
* Fixed invisible text in formatters by wrapping even the light CSS in media queries. Unfortunately this disables highlighting on old browsers, which instead show black text.
* Fixed CSS for highlight 3
* Added "only all and" to the dark media query, so it gets ignored by (extremely) old browsers.

Tested on Firefox 102.7.0 ESR, Firefox 109, Chromium 109 and Netsurf 3.10. Netsurf is a browser that does not support color schemes, and defaults to the light theme. Firefox has a "resist fingerprinting" mode, in which it always uses the light theme.

Regards,
Samuel

  reply	other threads:[~2023-01-22 13:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-01 21:15 [PATCH] css: Optional support " Samuel Lidén Borell
2023-01-02  0:51 ` Jason A. Donenfeld
2023-01-01 21:15   ` [PATCH RESEND v2] css: Support " Samuel Lidén Borell
2023-01-11 20:54     ` Jason A. Donenfeld
2023-01-11 20:56       ` Jason A. Donenfeld
2023-01-12  0:33         ` Samuel Lidén Borell
2023-01-12  0:34           ` Jason A. Donenfeld
2023-01-12  0:33         ` Jason A. Donenfeld
2023-01-22 11:35           ` [PATCH v3] " Samuel Lidén Borell
2023-01-22 13:04             ` Samuel Lidén Borell [this message]
2023-01-27 20:42             ` Jason A. Donenfeld
2023-01-29 17:07               ` Samuel Lidén Borell
2023-01-29 16:55                 ` [PATCH v4] " Samuel Lidén Borell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230122140437.4b530f77458029e4ae43c229@kodafritt.se \
    --to=samuel@kodafritt.se \
    --cc=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).