From fe4931de651779393885c11ff3378c4380a495b4 Mon Sep 17 00:00:00 2001 From: LeOu Date: Thu, 19 Nov 2026 13:26:25 -0500 Subject: [PATCH] Keep reading titles on the measure, fit diagram formulas to their cards and the hero ring to its stage --- docs/design.md | 4 +++- website/app/components/clarinet-hero/renderer.ts | 6 ++++-- .../components/experience/LogicDiagram.module.css | 15 +++++++++++++++ .../components/legal/LegalPaperPage.module.css | 11 ++++++++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/docs/design.md b/docs/design.md index c5c8652..1a987d7 100644 --- a/docs/design.md +++ b/docs/design.md @@ -99,7 +99,9 @@ title starts 112px below the top of the content field on desktop and 52px below header on phones; the rail's wordmark starts at the same 112px (`--content-top`), so it sits on the title's line. A page title keeps to four fifths of its column (`--title-width`); below 1024px it takes the whole column, so a long title holds a few -balanced lines on tablets and phones. +balanced lines on tablets and phones. On a reading page (papers, AI and legal articles) the +title also keeps to the reading measure, so it closes on the same edge as the text and +never reaches the guide that marks the measure. The rail's minimum width follows the interface type size, indent, padding, and scrollbar allowance, so the rail, reading field, and guides reflow together when text diff --git a/website/app/components/clarinet-hero/renderer.ts b/website/app/components/clarinet-hero/renderer.ts index ffef0af..694392b 100644 --- a/website/app/components/clarinet-hero/renderer.ts +++ b/website/app/components/clarinet-hero/renderer.ts @@ -106,8 +106,10 @@ export function mountClarinet(canvas: HTMLCanvasElement, hero?: HTMLElement) { const homeX = (Math.round(dot.x * dpr - dotPixels / 2) + dotPixels / 2) / dpr; const homeY = (Math.round(dot.y * dpr - dotPixels / 2) + dotPixels / 2) / dpr; const angle = random() * Math.PI * 2; - const radius = width * (.28 + random() * .22); - const x = entering ? width * .6 + Math.cos(angle) * radius : homeX; + // The entering ring stays inside the stage: centred at .52 of its width with an + // outer radius of .45, its right edge keeps clear of the frame's hairline. + const radius = width * (.27 + random() * .18); + const x = entering ? width * .52 + Math.cos(angle) * radius : homeX; const y = entering ? height * .5 + Math.sin(angle) * radius : homeY; return { ...dot, homeX, homeY, x, y, previousX: x, previousY: y, vx: 0, vy: 0, delay: clock.animationTime + random() * .36, diff --git a/website/app/components/experience/LogicDiagram.module.css b/website/app/components/experience/LogicDiagram.module.css index 6d944ed..74cc6a3 100644 --- a/website/app/components/experience/LogicDiagram.module.css +++ b/website/app/components/experience/LogicDiagram.module.css @@ -118,6 +118,21 @@ color: rgba(247, 246, 245, 0.68); } +/* A formula in a node fits its card: it scales down instead of scrolling, so + no glyph meets the card's edge or the connector beside it. */ +.nodeDetail [data-research-formula] { + max-width: 100%; + overflow: visible; + -webkit-mask-image: none; + mask-image: none; + animation: none; +} + +.nodeDetail [data-research-formula] svg { + max-width: 100%; + height: auto; +} + /* Connectors: one piece per lane in each connector column. */ .link { position: relative; diff --git a/website/app/components/legal/LegalPaperPage.module.css b/website/app/components/legal/LegalPaperPage.module.css index 23698e7..bff7909 100644 --- a/website/app/components/legal/LegalPaperPage.module.css +++ b/website/app/components/legal/LegalPaperPage.module.css @@ -17,14 +17,23 @@ margin-bottom: 5rem; } +/* On a reading page the title keeps to the reading measure, so its last line + stays inside the guide that closes the measure; below 1024px it takes the + whole column, like every title. */ .paper .header h1 { - max-width: var(--title-width); + max-width: min(var(--title-width), var(--reading-measure)); font-size: var(--type-title); font-weight: 400; line-height: var(--title-leading); letter-spacing: var(--title-tracking); } +@media (width < 1024px) { + .paper .header h1 { + max-width: var(--title-width); + } +} + .readingLayout { min-width: 0; }