Components · Layout and contentNot verified with Figma

Section

A section is a full-width block of a page. Its padding adjusts at each breakpoint and its surface is white or grey.

How to add a section to a page. The file is components/css/section.css.

Basic Usage

Link the shared stylesheet once per page. Never copy the rules into a page.

StepWhat to do
1. Link<link rel="stylesheet" href="/components/css/section.css">. Both templates already have it.
2. Side marginThe page defines --px-full. The templates already do; a page without it has no side margin.
3. First sectionAdd section--first to the first section after the breadcrumb.
4. SurfaceWhite is the default. Add section--secondary for a grey section.
5. Zeroed paddingAdd section--flush only for the five cases.

Section

Copy the markup you need.


API

Classes

ClassUse
sectionThe block: padding per breakpoint, white surface, sides var(--px-full).
section--firstLess top padding.
section--secondaryGrey surface.
section--flushZero top and bottom padding.
page-divider, page-divider__lineA line between two sections.
main-content, page-preambleThe My Pages page title block.

Things to know

  • --px-full must be defined by the page. Use it, never --px-page, for a divider’s sides.
  • The shared file marks the first section with .section--first only; :first-of-type is not in the file.
  • Between two sections that have padding, set padding-top: 0; padding-bottom: 0 on the page divider.
  • Mobile-first: write xs with no prefix, then add sm, md, lg and xl.

CSS / Tailwind

The component is one CSS file, shared by every page. Link it, never copy it. The CSS below is read from the file the page links, so it is always what you see.

CSS (components/css/section.css)