From bb00c7eec9ccf0525c4e05dd2dd5b5fbdf727146 Mon Sep 17 00:00:00 2001 From: onmax Date: Sat, 21 Nov 2026 17:18:32 +0100 Subject: [PATCH 1/8] fix(ui): fit a Markdown image on the screen, centered over its caption A tall image filled the whole column, over 1,000px in a 48rem one, so it covered the screen while you scrolled past. Typeset now caps an image at 70% of the window's height (40rem at most) and centers a captioned one. A click still zooms it whole. Blocks' own images, such as a screenshot's under its marks, keep their size. --- docs/pages/guide/typeset.md | 1 + e2e/typeset.e2e.ts | 32 ++++++++++++++++++++++++++++++++ packages/ui/src/typeset-css.ts | 8 ++++++++ 3 files changed, 41 insertions(+) diff --git a/docs/pages/guide/typeset.md b/docs/pages/guide/typeset.md index 6b1a4929..8b72461d 100644 --- a/docs/pages/guide/typeset.md +++ b/docs/pages/guide/typeset.md @@ -14,6 +14,7 @@ comark-ui styles a document's plain Markdown: headings, paragraphs, links, lists - **On by default.** Every `comark-ui` renderer writes them. - **Scoped to the document.** A `", 2); + expect(out.trimStart()).toMatch(/^