From 54d938bdee050d2ae30b495dbb0ab2a4772e9bd9 Mon Sep 17 00:00:00 2001 From: Alex Krawiec Date: Fri, 8 May 2026 13:10:11 -0700 Subject: [PATCH] Update media queries to avoid horizontal scroll when side menu appears --- src/components/docPage/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/docPage/index.tsx b/src/components/docPage/index.tsx index 7f3b3c62fa63a..6f508f4623882 100644 --- a/src/components/docPage/index.tsx +++ b/src/components/docPage/index.tsx @@ -164,6 +164,13 @@ export async function DocPage({ max-width: var(--doc-content-w); box-sizing: border-box; } + /* When the TOC is visible but the full layout doesn't fit yet, shrink content + to fill available space rather than overflowing. */ + @media (min-width: 1490px) and (max-width: 1649px) { + #doc-content { + max-width: calc(100vw - var(--sidebar-width, 300px) - var(--toc-w) - 2rem); + } + } /* Mobile responsive styles */ @media (max-width: 768px) { .main-content {