fix: remap CSS container rules from <main> to <article>

body > nav/header/article/footer all get container alignment
(max-width, auto margins, responsive padding). Replaces all
body > main selectors to match the new landmark structure.
This commit is contained in:
Vigilio Desto 2026-04-10 20:39:13 +02:00
parent c2261bfc9f
commit 82754338a9
Signed by: vigilio
GPG key ID: 159D6AD58C8E55E9
4 changed files with 24 additions and 25 deletions

View file

@ -14,7 +14,7 @@
/* ── Body baseline ──────────────────────────────────────────────────── */
main {
body > article {
max-width: var(--width-full);
margin-inline: auto;
}
@ -338,8 +338,8 @@ nav[data-nav="toc"] ul li + li::before {
}
}
/* Allow <main> as content column in docs layout — override body > main container sizing */
[data-layout="docs"] > main {
/* Allow article as content column in docs layout — override body > article container sizing */
[data-layout="docs"] > article {
max-width: none;
min-width: 0;
}
@ -404,7 +404,7 @@ nav[data-nav="toc"] ul li + li::before {
/* Reading-optimised width. ~65 characters per line — Bringhurst/LaTeX */
/* standard for comfortable prose. Use on <main> or any block element. */
main[data-layout="prose"],
article[data-layout="prose"],
[data-layout="prose"] {
max-width: 65ch;
margin-inline: auto;
@ -506,7 +506,7 @@ main[data-layout="prose"],
}
[data-layout="report"] > header,
[data-layout="report"] > main,
[data-layout="report"] > article,
[data-layout="report"] > footer {
max-width: 72ch;
margin-inline: auto;
@ -526,7 +526,7 @@ main[data-layout="prose"],
color: var(--text);
}
[data-layout="report"] > main {
[data-layout="report"] > article {
padding-bottom: var(--space-8);
}