From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3701 140.211.0.0/16 X-Spam-Status: No, score=-2.7 required=3.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0D9BA1F567 for ; Sun, 1 Sep 2024 05:15:04 +0000 (UTC) Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A27D7343091 for ; Sun, 1 Sep 2024 05:07:22 +0000 (UTC) Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) by grubbs.orbis-terrarum.net (Postfix) with ESMTP id 31FD3260663 for ; Sun, 1 Sep 2024 05:07:22 +0000 (UTC) Received: (qmail 561834 invoked by uid 10000); 1 Sep 2024 05:07:22 -0000 Date: Sun, 1 Sep 2024 05:07:22 +0000 From: "Robin H. Johnson" To: meta@public-inbox.org Subject: CSS behaviors bug report: dark/light switch non-functional Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EYvAeue5UOi6oOUG" Content-Disposition: inline List-Id: --EYvAeue5UOi6oOUG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I wanted to include a patch, but no obvious way without it being messy really stood out, so this is only a bug report. contrib/css describes using the 'prefers-color-scheme' media query selector, but Gentoo got a report that the selection between light & dark didn't work. One of the other devs traced it down to nuances of the HTML link media attribute: query expressions are not valid in the HTML variant in some browsers. This is also mentioned here: https://stackoverflow.com/questions/69113672/loading-css-based-on-prefers-c= olor-scheme-media-query > Loading CSS based on any media query expression seems to be out of specif= ication for the media attribute. As a workaround, I merged the two files with a wrapper, but it feels sub-optimal, because the entire text gets injected into the PI HTML. ``` @media(prefers-color-scheme: dark) { ... #content of 216dark } @media(prefers-color-scheme: light) { ... #content of 216light } ``` I think the cleanest solution would be a variant of the above: clauses, but with @import statements inside them, and making PI-httpd expose all the CSS Files. --=20 Robin Hugh Johnson Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer E-Mail : robbat2@gentoo.org GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136 --EYvAeue5UOi6oOUG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Robbat2 @ Orbis-Terrarum Networks - The text below is a digital signature. If it doesn't make any sense to you, ignore it. iQKTBAABCgB9FiEEveu2pS8Vb98xaNkRGTlfI8WIJsQFAmbT9ohfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEJE RUJCNkE1MkYxNTZGREYzMTY4RDkxMTE5Mzk1RjIzQzU4ODI2QzQACgkQGTlfI8WI JsSdzQ/8DTBMyXBxuADdk/mgpreOYX4Xqpzdma5lb2BSSL/x6mSdDKVFOoRrWv3s Uak6VdKPka+ou3K2kfmXCaafbP48R+aK3rQgu4KCn6jvRl62SxVIysW5SfjP2/gl Z01qfrDRb34PVGKTuesRWok/CeZUSM+a712hZDFc/1vEes7MopOEcndCePiUlFoE NF+CNfS4JsfW82n6+Y4ujohZFYB+zBjD+t5f59oFItHtdGsCujIhAZ8JZ4sdvqYw 0kq8ZAofsCf6aRTpxPpA284J5dCM/3ewos1Hjl+TIJxHvIRzj5ZdekPvaqcirI8I Q5U042CXo0c9pxtoxgdjZ/EApWD3Ug5E2vnUNO3hkzHpbOb3cFJzxshMlqveSWX5 a2R7dDmF28KXui4eTJwL8AvWS90cjzZCRsOsHmwHN/Oz1piZkpSuVLdAY5vJBVpv tjGaIauwHob7o0Xj14DOSELEZMqQE3BbTjXGZZpCdVEQB0FyITsSCyKHOx1xFMBf TpU+ScGjLNAZci1OivrEe42AHhoHUJ2txgFFnmSsob1/1zbFgaNLQtf/0V0bcrHC GvC7yBfB6mbK4B8+knAy0nx+RcIcxkH/LCk7TkQBWVFs+6iQre6oMARhs5nFokqB NtPx8Y8wWiv0kLSsWw/Ve21zupEClJZdoxCGOTvX4cSHBbbgiIA= =S10j -----END PGP SIGNATURE----- --EYvAeue5UOi6oOUG--