From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 E20C01F8C6 for ; Mon, 16 Aug 2021 14:50:19 +0000 (UTC) Received: by mail-qk1-x72f.google.com with SMTP id az7so19330338qkb.5 for ; Mon, 16 Aug 2021 07:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=mi8nS2vxI2J5gASX2qXlmJjYLnmEfrTgXp2GMGaAKSQ=; b=UgH1tT+0TM9iU8mjpGciyw6zJ12Jii40G5dIU+SRa0jLwE+duPd7AT+7BVQ2jj2s/x J1nBrOBV9BtRwGYo8aKnSiE4bCV1Ly5gZeQoCRMD/FknyGRonGa+JSPCzTzZ6vx8hvLq aYm2mBK0brX0zK9F/5+yHu9gdrOITRi1k8bMg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=mi8nS2vxI2J5gASX2qXlmJjYLnmEfrTgXp2GMGaAKSQ=; b=C9qX6IXwI5GL1dos9284ItMD9ZWZA+rhFkvGFJ33IPZ7ebYcH6aNB+oF2y44+JsYGA d+asUH7GgNSR4VEHieXOpoUoZO7DW72rOHr3IKPG8URA7ldgyp/4y5f2ElABrKb8HjUg uvImI+sEIFUMZhaRTKCD6CiNXFIM1ivBlLlPePfv2zA2x8J9p/+AxtEeBbD2APc+yZoB +dQNyvtEB13A5QcC5P4FaPwaioLFsp3ln2rZWNO1KohxdJOJN9UXu3ZDXA2EQ7nYBhdK ieQTdgK81acGt2cDIbyI4XdXUTvYVJ7fCxAhYR9WJL/5M5rZ/c55mUnIY8xwoLq73+fw 7pJg== X-Gm-Message-State: AOAM5300lP+CZ5TpzptEvcIS5NxI59cDRYPQopfMrHZM049PwbpU62Ye +sXhyB1mSztVNkRPaMnN/wXfewD1WfY7cPBR X-Google-Smtp-Source: ABdhPJxudMW242CMGii2ekGQq5dhRTYL18+dSw0u2ltt5bWVJarxox2FzUpG+mmcSI1DZ18I4HKf3g== X-Received: by 2002:a37:9dd5:: with SMTP id g204mr16137858qke.229.1629125417764; Mon, 16 Aug 2021 07:50:17 -0700 (PDT) Received: from nitro.local ([89.36.78.230]) by smtp.gmail.com with ESMTPSA id m188sm6436253qkc.99.2021.08.16.07.50.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 07:50:17 -0700 (PDT) Date: Mon, 16 Aug 2021 10:50:15 -0400 From: Konstantin Ryabitsev To: meta@public-inbox.org Subject: [PATCH] Duplicate base css definitions in stylesheets Message-ID: <20210816145015.2tbjqkozb6ezfkvj@nitro.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline List-Id: All pages carry the following inlined css declaration: However, site security policies may deliberately prohibit execution of inline content such as scripts and stylesheets as an extra layer of protection against XSS vulnerabilities. For example, with the following HTTP headers returned by the server, the inline styles above will be ignored: Content-Security-Policy: default-src 'self' This causes public-inbox content to be rendered poorly on mobile devices due to the default
 behaviour. Duplicating this declaration into
the contrib stylesheets makes sure that these styles are applied even
with the strictest security policies in place.

Signed-off-by: Konstantin Ryabitsev 
---
 contrib/css/216dark.css  | 3 ++-
 contrib/css/216light.css | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/css/216dark.css b/contrib/css/216dark.css
index 02804cbd..1277a49a 100644
--- a/contrib/css/216dark.css
+++ b/contrib/css/216dark.css
@@ -5,7 +5,8 @@
  * It reduces eyestrain for me, and energy usage for all:
  * https://en.wikipedia.org/wiki/Light-on-dark_color_scheme
  */
-* { background:#000; color:#ccc }
+* { font-size: 100%; font-family: monospace; background:#000; color:#ccc }
+pre { white-space: pre-wrap }
 
 /*
  * Underlined links add visual noise which make them hard-to-read.
diff --git a/contrib/css/216light.css b/contrib/css/216light.css
index c66cfdfe..741214c9 100644
--- a/contrib/css/216light.css
+++ b/contrib/css/216light.css
@@ -4,7 +4,8 @@
  * Suitable for print, and blinding people with brightness.
  * Haphazardly thrown together because bright colors hurt my eyes
  */
-* { background:#fff; color:#333 }
+* { font-size: 100%; font-family: monospace; background:#fff; color:#333 }
+pre { white-space: pre-wrap }
 
 /*
  * Underlined links add visual noise which make them hard-to-read.

base-commit: 0a3bcc909a9b023755079ee57f347f33aac75d3e
-- 
2.31.1