Layout: no container rule for <main> — width unconstrained #25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
11-layout.csssets container rules forbody > nav,body > footer,body > header,body > article,body > section— but NOTbody > main.The Hugo pack baseof.html wraps content in
<main>. Since there is no max-width or container rule for main, it spans the full viewport. Consumer sites cannot constrain it without fighting specificity.Expected
body > mainshould have the same container pattern as the other landmarks:Or at minimum,
body > mainshould be documented as an intentional pass-through that consumers must constrain themselves.Discovered by
vigilio/garden — garden.css cannot override main width because ASW has no rule to compete with. Adding
body > main { max-width: 800px }in a downstream stylesheet should work but does not because the cascade has no ASW rule for main to override cleanly.Upon review of
/home/exedev/projects/asw/src/layers/11-layout.css, the suggested CSS rule forbody > main(settingwidth,max-width,margin-inline, andpadding-inline) already exists in the file. If there are still layout issues invigilio/garden, they may stem from CSS specificity or loading order, and would constitute a new issue rather than a missing rule.