From e7b2b9add2d8b45f4dceaf542548f8c340457208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 17 Aug 2026 09:23:31 +0200 Subject: [PATCH] Fix docs pages overflowing horizontally on mobile GFM tables (config reference's Field/Type/Default/Notes tables) are wider than a phone screen and don't wrap, so without their own scroll container they forced the whole page to scroll horizontally instead. Wrap rendered tables in an overflow-x-auto div, and let long unbroken strings in table cells and inline code (env var names, paths) break instead of forcing extra width. Co-Authored-By: Claude Sonnet 5 --- src/components/docs/markdown-viewer.tsx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/components/docs/markdown-viewer.tsx b/src/components/docs/markdown-viewer.tsx index 3c53cb9..e91e2e6 100644 --- a/src/components/docs/markdown-viewer.tsx +++ b/src/components/docs/markdown-viewer.tsx @@ -2,6 +2,19 @@ import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; import { cn } from "@/lib/utils"; +// GFM tables (the config reference's Field/Type/Default/Notes tables) are wider than a phone +// screen and don't wrap - without their own scroll container the table forces the whole page +// to scroll horizontally instead. The typography plugin's table styles still apply to `table` +// here (its selectors match any descendant, not just direct children of `.prose`), so this +// wrapper only adds the scroll boundary. +function Table(props: React.ComponentProps<"table">) { + return ( +
+ + + ); +} + export function MarkdownViewer({ content }: { content: string }) { return (
- {content} + + {content} +
); }