diff --git a/dashboard/app/globals.css b/dashboard/app/globals.css index 61e7f7e..a4f04ce 100644 --- a/dashboard/app/globals.css +++ b/dashboard/app/globals.css @@ -630,6 +630,11 @@ body { padding: 0.1em 0.4em; font-size: 0.85em; font-weight: 500; + /* Inline code in METHODOLOGY.md includes contract ids and full Horizon paths, + which have no break opportunity: on a phone one such token sets a floor on + the page width and scrolls the whole document sideways. Break inside the + token only when it genuinely doesn't fit. */ + overflow-wrap: anywhere; } .prose-stenion :where(code):not(:where(pre code))::before, .prose-stenion :where(code):not(:where(pre code))::after { diff --git a/dashboard/components/markdown-doc.tsx b/dashboard/components/markdown-doc.tsx index 06cfedb..e6d486b 100644 --- a/dashboard/components/markdown-doc.tsx +++ b/dashboard/components/markdown-doc.tsx @@ -34,6 +34,15 @@ const components: Components = { // from elsewhere in the doc. Without an id those anchors work on GitHub and // silently dead-end on the site. h4: ({ children }) =>

{children}

, + // METHODOLOGY.md has several wide multi-column tables. A prose table is + // width:100%, but its min-content width is set by its longest cell, so on a + // narrow screen the table sets a floor on the page width and scrolls the whole + // document sideways. Give each table its own horizontal scroll container. + table: ({ children }) => ( +
+ {children}
+
+ ), a: ({ href, children }) => { const h = href ?? ''; if (h.startsWith('#')) return {children}; @@ -49,7 +58,7 @@ const components: Components = { /** Render a markdown string with the Stenion dark prose theme. */ export function MarkdownDoc({ source }: { source: string }) { return ( -
+
{source}