From a1a6ec71dbb30ab8381fa2bd0917b865db985c0c Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Wed, 18 Nov 2026 21:53:27 +0000 Subject: [PATCH] Easier to read: spacing, inline code, and a phone's first screen The site keeps its face and colours. Prose in Overpass Mono now has a little more room: line-height 1.65 from 1.5, letters a hundredth of an em closer, paragraphs and list items stopping at seventy characters, and list items apart. Inline code had no style, so the browser's own monospace showed inside the site's in mid-sentence; it is the site's face on a tint now (#F1EDF0 light, #1D2127 dark), and a long formula wraps with its tint rather than pushing a phone's page sideways. On a phone the logo took the first screen at 250px: it is 96px, the header has the Try it live button under the name, and the text column is 90% of the width rather than 70%, where a line held some twenty characters. No page scrolls sideways at 320px (overflow.mjs). Co-authored-by: Claude Opus 5.5 --- src/content/_templates/top.html | 1 + styles.css | 39 +++++++++++++++++++++++++++++---- themes.css | 10 +++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/content/_templates/top.html b/src/content/_templates/top.html index 9ba4c6b951..0715233f70 100644 --- a/src/content/_templates/top.html +++ b/src/content/_templates/top.html @@ -63,6 +63,7 @@

Table of contents

AngouriMath

+

Try it live

diff --git a/styles.css b/styles.css index 467fc16139..304c733dd0 100644 --- a/styles.css +++ b/styles.css @@ -1,10 +1,35 @@ body { font-family: "Overpass Mono"; font-size: 14pt; - line-height: 1.5; + line-height: 1.65; + letter-spacing: -0.01em; overflow-x: hidden; } +/* Prose in a monospace face tires the eye on long lines: paragraphs and lists stop near seventy + characters, a little apart, so a page reads as paragraphs rather than as one block. */ +.main p, +.main li { + max-width: 70ch; +} + +.main li { + margin-bottom: 0.45em; +} + +/* Code inside a sentence, in the site's own face rather than the browser's monospace, on a tint + so that a formula is told from the words around it. */ +:not(pre) > code { + font-family: "Overpass Mono", monospace; + font-size: 0.92em; + padding: 0.08em 0.35em; + border-radius: 4px; + /* A long formula wraps, its tint carried onto each line, rather than pushing a phone's page sideways. */ + overflow-wrap: anywhere; + -webkit-box-decoration-break: clone; + box-decoration-break: clone; +} + .regular-table table, .regular-table tbody tr th, .regular-table tr td { border: 1px solid gray; border-collapse: collapse; @@ -107,9 +132,10 @@ mjx-container[display="true"] { @media (max-width: 1099px) { + /* Most of a phone's width for the text: at 70% a line held some twenty characters. */ .main { - width: 70%; - margin-left: 15%; + width: 90%; + margin-left: 5%; } iframe { @@ -148,8 +174,13 @@ mjx-container[display="true"] { padding: 15px; } + /* A phone's first screen shows the name, the way in and the page, not only the logo. */ .logo { - width: 250px; + width: 96px; + } + + .head-of-page a.try-live { + font-size: 16pt; } } diff --git a/themes.css b/themes.css index 44dbcd16dd..928043e47c 100644 --- a/themes.css +++ b/themes.css @@ -1,4 +1,9 @@ @media (prefers-color-scheme: light) { + :not(pre) > code { + background-color: #F1EDF0; + color: #3F3F3F; + } + body { color: #474747; background-color: white; @@ -59,6 +64,11 @@ } @media (prefers-color-scheme: dark) { + :not(pre) > code { + background-color: #1D2127; + color: #D7D7D7; + } + body { color: #A7A7A7; background-color: #0D1117;