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

@ -889,13 +889,13 @@ meter:-moz-meter-sub-sub-optimum::-moz-meter-bar {
}
/* ── Content Container ─────────────────────────────────────────────── */
/* body > nav, body > main, and body > footer share container alignment so agents
can write <body><nav><main><footer> and get consistent widths.
Scoped to body > nav/main/footer to avoid affecting nested elements
(breadcrumbs, pagination, mains inside grid layouts). */
/* All body-level landmarks share container alignment:
<body> > <nav>, <header>, <article role="main">, <footer>
Scoped to body > child to avoid affecting nested elements. */
body > nav,
body > main,
body > header,
body > article,
body > footer {
width: 100%;
margin-right: auto;
@ -904,10 +904,10 @@ body > footer {
padding-left: var(--space-4);
}
/* Default: constrained container (replaces .container class) */
@media (--sm-n-above) {
body > nav,
body > main:not([data-layout="fluid"]),
body > header,
body > article,
body > footer {
max-width: var(--width-sm);
padding-right: 0;
@ -917,7 +917,8 @@ body > footer {
@media (--md-n-above) {
body > nav,
body > main:not([data-layout="fluid"]),
body > header,
body > article,
body > footer {
max-width: var(--width-md);
}
@ -925,7 +926,8 @@ body > footer {
@media (--lg-n-above) {
body > nav,
body > main:not([data-layout="fluid"]),
body > header,
body > article,
body > footer {
max-width: var(--width-lg);
}
@ -933,7 +935,8 @@ body > footer {
@media (--xl-n-above) {
body > nav,
body > main:not([data-layout="fluid"]),
body > header,
body > article,
body > footer {
max-width: var(--width-xl);
}
@ -941,13 +944,9 @@ body > footer {
@media (--xxl-n-above) {
body > nav,
body > main:not([data-layout="fluid"]),
body > header,
body > article,
body > footer {
max-width: var(--width-2xl);
}
}
/* Full-width opt-out */
body > main[data-layout="fluid"] {
max-width: none;
}