Skip to content

Commit 18a99f5

Browse files
colbymchenryclaude
andauthored
fix(site): center docs content on wide screens (#378)
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) <noreply@anthropic.com>
1 parent 6a2098b commit 18a99f5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

site/src/styles/theme.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,12 @@ button[data-open-modal] {
215215
color: var(--cg-ink);
216216
text-underline-offset: 3px;
217217
}
218+
219+
/* On wide screens Starlight right-aligns the content against the TOC
220+
(margin-inline: auto 0), piling all the empty space on the left. Center the
221+
content within its pane so it sits balanced between the sidebar and the TOC. */
222+
@media (min-width: 72rem) {
223+
.main-pane {
224+
--sl-content-margin-inline: auto;
225+
}
226+
}

0 commit comments

Comments
 (0)