fix(web): keep wrapped split diffs from jumping while scrolling (#20022)

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-10-15 13:31:35 -07:00
1 parent c079503d07
commit 4036e18597
1 file changed
+7
@@ -14,6 +14,13 @@ import { DiffWorkerPoolProvider } from "../DiffWorkerPoolProvider";
/** The app's diff stylesheet, shared by single-file renderers so their separators match. */
export const DIFF_VIEW_UNSAFE_CSS = `${DIFF_SURFACE_THEME_UNSAFE_CSS}
/* A 1fr track's automatic minimum grows with the currently mounted lines. In split
wrap mode that shifts width between columns, rewraps rows and makes the virtualizer
repeatedly correct the scroll position. Keep both code columns at the same width. */
[data-diff-type="split"][data-overflow="wrap"] {
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
}
:is(
[data-line],
[data-line-annotation],