Page layout
Where a nav or aside sits decides its role, with no attributes:
-
A
navdirectly insidebody > headeris a sticky top bar. A second one right after it is a subnav that sticks below it. -
A
navorasidedirectly insidebodybecomes a sticky column besidemainon wide screens, like this page's component list and "On this page" rail. - On narrow screens everything stacks, and navs become rows that scroll sideways.
The docs layout shows a top bar, subnav, side nav, and rail together.
Split bar
A nav with two lists puts them at opposite ends, such as a brand and links.
Accessibility
Label every nav when a page has more than one, so screen reader users can tell them apart.
Customize
Links use the text color and turn primary on hover and for aria-current.
Callouts and contact details
An aside inside content is a callout on a raised surface. hr and
address round out the page furniture.
m.css
hello@example.com
Accessibility
An aside is a complementary landmark. Give it a label if a page has more than one.
Customize
Callouts use the raised surface and --m-radius.