Explorar el Código

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>
Colby Mchenry hace 4 semanas
padre
commit
18a99f5f0f
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. 9 0
      site/src/styles/theme.css

+ 9 - 0
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;
+	}
+}