From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6497 invoked from network); 12 Jan 2023 00:35:56 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2023 00:35:56 -0000 Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 6a669932; Thu, 12 Jan 2023 00:35:44 +0000 (UTC) Return-Path: Received: from ams.source.kernel.org (ams.source.kernel.org [2604:1380:4601:e00::1]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id 68f5095d (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for ; Thu, 12 Jan 2023 00:35:43 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DEC2AB81C08 for ; Thu, 12 Jan 2023 00:35:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B41EC433D2 for ; Thu, 12 Jan 2023 00:35:41 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Ph3Pe50H"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="GZOifUxf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1673483739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MD6nePc+rfY4Ah6JccmDRXckXhzS3w8WeONM/wpNZo8=; b=Ph3Pe50HkvyMDO3Ai+iAIF8Z4vBzPinN4dM8k5j+4rz0ICMv+vTcAZv/NUp3WCkuARI44k jL7fk+JYMPMkcivQ9Xd3ni4DqO8AIswzfFdQ5MtlctyZ9MGSfeatAOnri6Pp+EGGFCwvWy Q3StCEGsfHAbT4wTOkJcjCDKQPgE8NQ= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 0844764c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Thu, 12 Jan 2023 00:35:39 +0000 (UTC) Received: by 2002:a05:7110:1303:b0:1b3:cd53:dd11 with SMTP id i3csp1415843gee; Wed, 11 Jan 2023 16:33:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXsKjfmkCIW/ebZpPw297t68McyukZhqukLj8fD0IrFTfVxxbqwyfHqZEF367jQhOCYkv5lL X-Received: by 2002:a17:906:18e2:b0:7c1:4bb:b157 with SMTP id e2-20020a17090618e200b007c104bbb157mr73762991ejf.4.1673483637875; Wed, 11 Jan 2023 16:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673483637; cv=none; d=google.com; s=arc-20160816; b=nmdO3kma1mnxp2htkAQT+cFn2gvtYlaH7YXtM+n5L9XFMQ8k5mhWNMeLOQ6f35Ag8B gkp+kvrou3mtc9oA6clzhFnr/yBBAmKSMFGTi0t+3FFyEq0iqCvJsLC9rFzZsX/4xCIZ 8JHWAPwSd7L7TH/QH869zmfCSl4BjWT8dPdzrzGYYMCb13xxSpITV6xPXt28qMxASzD2 lG9SVqB4r98Qqsxf7WvM/r8Pc3F+yjokcYC3D0pdg0cPvjfqlf+7NLsux/I9XTaxkhFA ivhl4aOlTPcsJhy9EMDq+AiD7Uo/fWRDgdzheX2ss4zE17tH4AJt37rBa11mCl0jWAI2 Fypg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:dkim-signature; bh=MD6nePc+rfY4Ah6JccmDRXckXhzS3w8WeONM/wpNZo8=; b=Wgw7Fr9GNtJMgqmCjnjKaX9sP9aWMlOPp7IjHv97mplzAUN73KinYG51CY1RH+c2RS Hn/7nxc2k9QMTqXjpOaX4keLRFPmzgFAwREUedD/Nzy2Mjaf+jy2B0t8xkmW+OHMaufD Piw0D9Ox++MFIxScfdRC9kXeT+oH2kK0r3KHQb3gOEsgjSdAcY7Zmff5Cm2f/32M6c6A LEGk7+5qU3jHlCzE32kdjLPuWB23K0ToufLVW2ME6XLBiuI2qE9ErcxUkNrC6uwX8yzJ ytmaO63DpNgXIRfcsstn9minP60Q38QuNdK9oUjzUCj6zGmNDXwXwPhWyg2fK4QIUSlu BNdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=GZOifUxf; spf=pass (google.com: domain of srs0=hfei=5j=zx2c4.com=jason@kernel.org designates 2604:1380:4601:e00::1 as permitted sender) smtp.mailfrom="SRS0=HFEI=5J=zx2c4.com=Jason@kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: from ams.source.kernel.org (ams.source.kernel.org. [2604:1380:4601:e00::1]) by mx.google.com with ESMTPS id sh39-20020a1709076ea700b007c10f6a46c5si16800726ejc.219.2023.01.11.16.33.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2023 16:33:57 -0800 (PST) Received-SPF: pass (google.com: domain of srs0=hfei=5j=zx2c4.com=jason@kernel.org designates 2604:1380:4601:e00::1 as permitted sender) client-ip=2604:1380:4601:e00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=GZOifUxf; spf=pass (google.com: domain of srs0=hfei=5j=zx2c4.com=jason@kernel.org designates 2604:1380:4601:e00::1 as permitted sender) smtp.mailfrom="SRS0=HFEI=5J=zx2c4.com=Jason@kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7B0C5B81D7E; Thu, 12 Jan 2023 00:33:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF342C433EF; Thu, 12 Jan 2023 00:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1673483633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MD6nePc+rfY4Ah6JccmDRXckXhzS3w8WeONM/wpNZo8=; b=GZOifUxf9VEhvjjFymwbJF3VRh+rh84As8VNKz9/RbOHxB/3JUzANmWZ+oqNMiHy6a6+WF 69UA1thw2lnMjZBTPcNp34TuVi/4B9xMRcimObfpBlukUGvTGdZ8LQWGEbahaUilpS3gC6 eUR5ky5Tn+mXJOfX74OI1xQEK53iWko= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 5edc8a9c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 12 Jan 2023 00:33:53 +0000 (UTC) Date: Thu, 12 Jan 2023 01:33:50 +0100 From: "Jason A. Donenfeld" To: samuel@kodafritt.se Cc: cgit@lists.zx2c4.com Subject: Re: [PATCH RESEND v2] css: Support for dark mode Message-ID: References: <20230101214103.1E52F19A2@badger.kodafritt.se> <20230105225343.0264A262C@badger.kodafritt.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" On Wed, Jan 11, 2023 at 09:56:30PM +0100, Jason A. Donenfeld 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. I fixed this with the below diff. It uses an explicit `@media (prefers-color-scheme: light) block`, which MDN says, "indicates that user has notified that they prefer an interface that has a light theme, or has not expressed an active preference." So this seems correct. However, I also order the light *after* the dark for non-media-query understanding browsers. I suspect the same should be done on all the other files. The below diff is now on git.zx2c4.com, so you can use that link earlier to see what it's like. Unfortunately, I think a lot of the rest of the styling is too dark or otherwise clashing. So you might want to give the whole thing a second pass. diff --git a/filters/syntax-highlighting.py b/filters/syntax-highlighting.py index 672201d..fafa30e 100755 --- a/filters/syntax-highlighting.py +++ b/filters/syntax-highlighting.py @@ -53,9 +53,11 @@ except TypeError: # highlight! :-) # printout pygments' css definitions as well sys.stdout.write('') sys.stdout.write(highlight(data, lexer, formatter, outfile=None))