diff --git a/src/styles/diff.css b/src/styles/diff.css index 269c315..f81b1a4 100644 --- a/src/styles/diff.css +++ b/src/styles/diff.css @@ -1,10 +1,19 @@ /* Diff layout + line colors. Everything is scoped under `pre.dh-on` so toggling the extension off (which removes that class) fully restores the plain view. */ +/* Chrome's text/plain body has margin: 8px by default. Zero it out so the pre + fills the viewport exactly — no margin overflow, no phantom scrollbar. */ +body:has(pre.dh-on) { + margin: 0; + padding: 0; +} + pre.dh-on { margin: 0; padding: 12px 0; - min-height: 100vh; + /* overflow-x: auto keeps long lines scrollable within the pre itself rather + than spilling to the page and causing a page-level horizontal scrollbar. */ + overflow-x: auto; box-sizing: border-box; tab-size: 4; font: 12px/1.5 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,