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:
parent
c2261bfc9f
commit
82754338a9
4 changed files with 24 additions and 25 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue