diff --git a/src/web/public/styles.css b/src/web/public/styles.css index 18e9e56b..89fdc70b 100644 --- a/src/web/public/styles.css +++ b/src/web/public/styles.css @@ -12549,12 +12549,16 @@ html:is([data-skin="paper-gray"], [data-skin="solarized-light"], [data-skin="cat No width cap. The window is whatever the user drags or expands it to, so the document must reflow to fill it; the fixed 960px reading column this rule shipped before the resize grip existed stops reflow once the window is wider - than the cap. Pinned by test/file-preview-window.test.ts. */ + than the cap. --rv-content-max: none lets ASCII-diagram blocks + (.rv-text .rv-diagram-wrap, capped by that variable with a 720px fallback + meant for the Response Viewer) follow the rest of the document too. Pinned by + test/file-preview-window.test.ts. */ .file-preview-body > .file-preview-md { padding: 1rem 1.25rem 2rem; font-size: 15px; line-height: 1.55; + --rv-content-max: none; } /* Relative links in the document are rebased onto a.rv-path so the Response diff --git a/test/file-preview-window.test.ts b/test/file-preview-window.test.ts index 08842771..d69a1cf0 100644 --- a/test/file-preview-window.test.ts +++ b/test/file-preview-window.test.ts @@ -391,6 +391,9 @@ describe('file viewer rendered markdown width', () => { const rvBase = stylesCss.match(/\.rv-text,\s*\.response-viewer-body > :not\(\.rv-message\) \{[^}]*\}/); expect(rvBase, 'the shared prose rule').not.toBeNull(); expect(rvBase![0], 'no width cap on the shared prose rule').not.toMatch(/max-width/); + // ASCII-diagram blocks cap themselves at var(--rv-content-max, 720px), which only the + // Response Viewer sets; the document lifts it so a diagram follows the window too. + expect(mdRule![0], 'diagram blocks follow the window').toMatch(/--rv-content-max:\s*none;/); }); });