From ba2f98c7fb6701f5557e36c2135e12828dbab2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Tue, 1 Sep 2026 03:25:43 +0100 Subject: [PATCH] the width label goes outside the measure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It sat just inside the left guide, which is on top of the page — over the logo, on this site — and it is not part of the page. The margin is the one strip on screen belonging to the editor rather than to the site, so the number describing the measure lives there. Right rather than left: the eye reads the guide and then the width, so the label is the answer to the line beside it, and the right margin is the one a wide frame has room in. Co-Authored-By: Claude Opus 5 (1M context) --- web/canvas.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/canvas.ts b/web/canvas.ts index bf2ff5d..b957bcb 100644 --- a/web/canvas.ts +++ b/web/canvas.ts @@ -541,7 +541,17 @@ export function paintMeasure(document: Document): () => void { style(label, [ 'position:fixed', 'top:0.25rem', - `left:${Math.round(box.left + 4)}px`, + /* + Outside the measure, past the RIGHT guide. + + It sat just inside the left edge, which is on top of the page — over the logo, on this site — + and it is not part of the page. The margin is the one place on screen that belongs to the + editor rather than to the site, so the number that describes the measure goes there. + + Right rather than left because the eye reads the guide, then the width: the label is the answer + to the line it sits beside, and the right margin is the one a wide frame actually has room in. + */ + `left:${Math.round(box.right + 6)}px`, 'font-size:0.625rem', 'font-family:ui-sans-serif, system-ui, sans-serif', `color:${ACCENT}`,