From 63673cb2ca2fdb15d802a72a4a9dc45b10a2f6e2 Mon Sep 17 00:00:00 2001 From: Taylor Bombay Date: Tue, 8 Sep 2026 01:54:24 +0000 Subject: [PATCH] fix(diff): make diff hunks equal width - Use grid sizing to align diff rows and hunk blocks - Preserve full-width layout for wrapped text diffs --- src/renderer/styles.css | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/renderer/styles.css b/src/renderer/styles.css index 63f9345..5e3f1c2 100644 --- a/src/renderer/styles.css +++ b/src/renderer/styles.css @@ -3342,7 +3342,15 @@ textarea, .diff-output.image { padding: 0; background: var(--card); white-space: normal; } .diff-rows { - display: contents; + display: grid; + grid-template-columns: minmax(max-content, 1fr); + width: max-content; + min-width: 100%; +} + +.diff-output.text.is-wrapped .diff-rows { + grid-template-columns: minmax(0, 1fr); + width: 100%; } .markdown-preview-output { @@ -3520,8 +3528,8 @@ textarea, } .diff-hunk-block { - width: max-content; - min-width: 100%; + width: auto; + min-width: 0; margin: 10px 0; overflow: clip; border: 1px solid var(--diff-hunk-group-border);