Files
museion/Museion/Resources/reading.css
T
AlexKucera 4cb753d17f feat(reading): polish typography, externalize CSS
Critique-directed polish of the reading surface (#72 ruling: pipeline
calm, surface not-calm) plus the single-user typography rework:

- Flow: leading 1.5, paragraph gap tightened; heading ladder rescaled
  (h1 1.15x / h2 0.85x / h3 body-face semibold) with cling margins,
  hN+hN suppression, no title dead space
- Constructs: confident blockquote (near-ink text, 3px rail, nesting
  degrades), booktabs tables, tinted code panels, relative inline code
- Fonts hardcoded for Alexander's faces: Valkyrie OT B 17 body,
  Concourse OT Semibold headings, UbuntuMono 14 code; 66ch measure
- Stylesheet moved to Museion/Resources/reading.css, read fresh per
  page build — Debug builds load the repo copy (#filePath), so CSS
  edits hot-reload on the next reading toggle
- Settings Typography/Text Flow sections and all flow-key plumbing
  deleted (56 insertions, 417 deletions)

Refs #72, #78. Detector: 192 findings -> 0. Build + 93 tests green.

[Generated by AI]
2026-10-07 17:02:10 +02:00

79 lines
4.0 KiB
CSS

/* Museion reading mode — the whole reading surface's look lives here.
Edit while the app runs: save, toggle reading mode (⌘R), see it. No rebuild.
Shipped via fs-sync at Museion/Resources/reading.css; read per page build. */
:root {
--body-face: "Valkyrie OT", Georgia, serif;
--body-size: 17px;
--headings-face: "Concourse OT", Georgia, serif;
--headings-size: 26px;
--code-face: "UbuntuMono Nerd Font Mono", UbuntuMonoNFM, monospace;
--code-size: 14px;
--lh: 1.8;
--para-space: 17px;
--head-space-before: 90px; /* above a heading — closes the previous section */
--head-space-after: 30px; /* below a heading — before its content */
--measure: 66ch;
--ink: #1d1d1f; --muted: #6e6e73; --secondary: #48484d;
--hairline: #d2d2d7; --rule: #a1a1a6; --substrate: #f5f5f7;
}
html { background: #fbfbfd; }
body {
margin: 24px auto; padding: 0 24px; width: var(--measure); max-width: calc(100vw - 48px);
color: var(--ink); font-family: var(--body-face); font-size: var(--body-size);
line-height: var(--lh); -webkit-font-smoothing: antialiased;
}
body > :first-child { margin-top: 0; }
p { margin: var(--para-space) 0 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--headings-face); font-weight: 600; line-height: 1.15; margin: var(--head-space-before) 0 var(--head-space-after); }
h1 { font-size: calc(var(--headings-size) * 1.15); }
h2 { font-size: calc(var(--headings-size) * 0.85); }
h3 { font-size: calc(var(--body-size) * 1.12); font-family: var(--body-face); font-weight: 600; }
h4, h5, h6 { font-family: var(--body-face); font-size: var(--body-size); font-weight: 700; }
h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p,
h1 + ul, h2 + ul, h3 + ul, h4 + ul, h5 + ul, h6 + ul,
h1 + ol, h2 + ol, h3 + ol, h4 + ol, h5 + ol, h6 + ol,
h1 + blockquote, h2 + blockquote, h3 + blockquote, h4 + blockquote, h5 + blockquote, h6 + blockquote,
h1 + pre, h2 + pre, h3 + pre, h4 + pre, h5 + pre, h6 + pre,
h1 + table, h2 + table, h3 + table, h4 + table, h5 + table, h6 + table { margin-top: 0; }
h1 + h2, h1 + h3, h1 + h4, h1 + h5, h1 + h6,
h2 + h3, h2 + h4, h2 + h5, h2 + h6,
h3 + h4, h3 + h5, h3 + h6,
h4 + h5, h4 + h6,
h5 + h6 { margin-top: 0.35em; }
ul, ol { margin: var(--para-space) 0 0; padding-left: 1.6em; }
li { margin: 0; }
li > ul, li > ol { margin: 0; }
pre {
font-family: var(--code-face); font-size: var(--code-size); line-height: 1.5;
margin: var(--para-space) 0 0; padding: 14px 16px;
background: var(--substrate); border: none; border-radius: 8px; white-space: pre-wrap;
}
code { font-family: var(--code-face); font-size: 0.88em; }
pre code { font-size: var(--code-size); }
blockquote {
margin: calc(var(--para-space) * 1.25) 0 0; padding: 0 0 0 20px;
border-left: 3px solid var(--rule); color: var(--secondary);
}
blockquote p { margin: 0; }
blockquote blockquote { border-left-width: 1.5px; border-left-color: var(--hairline); padding-left: 16px; }
hr { border: none; border-top: 1px solid var(--hairline); margin: calc(var(--head-space-before) * 0.75) 0 0; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
table {
border-collapse: collapse; margin: calc(var(--para-space) * 1.25) 0 0; width: 100%;
border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule);
}
th, td { border: none; border-bottom: 1px solid var(--hairline); padding: 7px 12px; text-align: left; }
th { font-weight: 600; border-bottom: 1.5px solid var(--rule); }
tr:last-child td { border-bottom: none; }
figure { margin: var(--para-space) 0 0; }
figure img { max-height: 1.6em; transition: max-height .25s ease; vertical-align: middle; }
figure:hover img { max-height: 420px; }
figcaption { display: none; }
section.footnotes { color: var(--muted); }
section.footnotes li p { margin: 0; }
[data-source-line]:hover { background: rgba(0,122,255,.05); }
::selection { background: rgba(0,122,255,.12); }
:focus-visible { outline: 2px solid rgba(0,122,255,.6); outline-offset: 2px; }