From 18a99f5f0f94f35cc6679742dd2653a385fb7dba Mon Sep 17 00:00:00 2001 From: Colby Mchenry Date: Sun, 24 May 2026 13:38:33 -0500 Subject: [PATCH] fix(site): center docs content on wide screens (#378) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starlight right-aligns the content against the TOC (margin-inline: auto 0) on pages with both a sidebar and a TOC, dumping all the empty space on the left edge — very lopsided on wide monitors. Center the content in its pane. Co-authored-by: Claude Opus 4.7 (1M context) --- site/src/styles/theme.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/site/src/styles/theme.css b/site/src/styles/theme.css index 74a0b0e..4a406fa 100644 --- a/site/src/styles/theme.css +++ b/site/src/styles/theme.css @@ -215,3 +215,12 @@ button[data-open-modal] { color: var(--cg-ink); text-underline-offset: 3px; } + +/* On wide screens Starlight right-aligns the content against the TOC + (margin-inline: auto 0), piling all the empty space on the left. Center the + content within its pane so it sits balanced between the sidebar and the TOC. */ +@media (min-width: 72rem) { + .main-pane { + --sl-content-margin-inline: auto; + } +}