From ab2bd9db26c5931f30d840cb0c84128e7176ad04 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sat, 6 Mar 2021 10:45:58 +0800 Subject: [PATCH] tweaks to pre/code css styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follows Apple’s example. • `code` within normal text is sized to 1em • `code` within `pre` is sized slightly smaller and the letter-spacing is tightened --- Shared/Article Rendering/shared.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Shared/Article Rendering/shared.css b/Shared/Article Rendering/shared.css index fa2a5920d..9989734c4 100644 --- a/Shared/Article Rendering/shared.css +++ b/Shared/Article Rendering/shared.css @@ -137,7 +137,6 @@ pre { margin: 0; overflow: auto; overflow-y: hidden; - word-wrap: normal; word-break: normal; } @@ -145,12 +144,18 @@ pre { pre { line-height: 1.4286em; } + code, pre { font-family: "SF Mono", Menlo, "Courier New", Courier, monospace; - font-size: .8235em; + font-size: 1em; -webkit-hyphens: none; } +pre code { + letter-spacing: -.027em; + font-size: 0.9375em; +} + .nnw-overflow { overflow-x: auto; }