From c0ea6c53e5843cf8f620eb778fb4924e44d77a1f Mon Sep 17 00:00:00 2001 From: interlope Date: Fri, 29 May 2026 18:11:12 +0200 Subject: [PATCH] Fix overflow issue on pre/code blocks in flex columns by adjusting min-width --- css/style.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/css/style.css b/css/style.css index 3a9f681..0bcd41f 100644 --- a/css/style.css +++ b/css/style.css @@ -369,6 +369,16 @@ pre { border-left: 3px solid var(--accent); padding: var(--space-md); overflow-x: auto; + /* max-width + min-width:0 on flex ancestors is required for overflow-x:auto + to actually scroll rather than expand or clip the flex column. */ + max-width: 100%; + white-space: pre; +} + +/* Bootstrap flex columns default to min-width:auto, which lets them grow past + their grid width and breaks overflow-x:auto on pre/code blocks inside them. */ +.row > [class*="col-"] { + min-width: 0; } code {