Spectra v0.1

Fundamentals / layout

Priority 1

Layout

Back to docs

Spectra keeps layout small on purpose: containers for width, stack for rhythm, and a docs grid when cards need to wrap cleanly.

Core layout classes

ClassUsed forContract
.sp-containerPage-width outer shellCenters content, uses --sp-container-max, and adds inline padding with --sp-4.
.sp-contentReadable inner widthKeeps docs and long content inside --sp-content-max.
.sp-container-narrowCompact demos and narrow shellsUses --sp-container-narrow and a padded frame for tighter compositions.
.sp-stackVertical rhythm between siblingsAdds margin-top: var(--sp-3) between direct children.
.docs-gridDocs-only card gridAuto-fit grid using --sp-doc-card-min so manual cards wrap cleanly.

Preview

Outer shell

Container max width + page padding

Vertical rhythm

First block
Second block
Third block

Typical composition

<main class="sp-container sp-content">
  <section class="sp-stack">
    <h1 class="sp-h2">Page title</h1>
    <p class="sp-muted">Readable width, token-driven rhythm.</p>
  </section>
</main>