Skip to the page

MCSS-Lite 0.4.1

GitHub

Section l-section

StableLayout · since 0.1.0

Vertical padding for a full-width page section.

Pick this part

Pick l-section for

  • Full-width bands of a page that need vertical breathing room, such as a hero or a feature row.

Pick another part for

  • Spacing between components inside a section: use l-stack.
  • A bordered group of content: use c-card.

Build it

  1. Start with an element and add class="l-section".
  2. Pick at most one size modifier: --sm.
  3. Put the parts inside. The layout sets the space between them, so they need no margins.

Features

Show markup 5 lines
<section class="l-section">
  <div class="l-container">
    <h2 class="u-margin-0">Features</h2>
  </div>
</section>

Check your build

Each piece that doesn't fit was run through mcss-lite validate when this page was built. The output below is real.

Fits

Put a container inside the section for the side gutters.

Features

Show markup 5 lines
<section class="l-section">
  <div class="l-container">
    <h2 class="u-margin-0">Features</h2>
  </div>
</section>

validate: 0 issues

Doesn't fit

Don't invent size modifiers; use l-section--sm for a tighter band.

<section class="l-section l-section--xl">
  <h2 class="u-margin-0">Features</h2>
</section>

validate

  • error Unknown class "l-section--xl". Did you mean "l-section--sm"? Only classes from the MCSS-Lite contracts exist. [unknown-class]

Spec sheet

Modifiers
ClassGroupWhat it does
l-section--smsize (pick one)Smaller vertical padding (2.5rem instead of 4rem).

Fits with