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;