From 6a35d3b8442f4831c241cd75c896fe8bac1e7859 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Wed, 8 Apr 2026 17:27:26 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20mobile=20overflow=20=E2=80=94=20constrai?= =?UTF-8?q?n=20pre=20blocks=20within=20viewport,=20allow=20internal=20scro?= =?UTF-8?q?ll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/global.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/styles/global.css b/src/styles/global.css index f8d4b15..fb99c8f 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -49,12 +49,21 @@ border-radius: 3px; } - /* All pre blocks: stay within viewport, scroll content */ + /* Prevent any content from blowing out the viewport width */ + body { + overflow-x: hidden; + } + + /* Pre blocks scroll their own content horizontally */ pre { - max-width: 100%; overflow-x: auto; } + /* Flex children containing pre blocks must be allowed to shrink */ + li > div { + min-width: 0; + } + /* Shiki code blocks — match site card background */ .astro-code { background-color: var(--color-bg-card) !important;