Page layout
Summary
How content sits inside the shell: width modes on the content container (fluid by default, fixed or narrow by class), a centred focused-card mode for login and wizard flows, the 12-column grid that places widgets, the page footer, and a few small utilities. Everything here is CSS-only.
When to use
| Mode | Use it for |
|---|---|
| Fluid (default) | Dashboards and data-heavy pages: content uses the full width, no class needed. |
.soma-page-fixed | General pages that shouldn't stretch on wide monitors; centred, max 1200px. |
.soma-page-narrow | Reading, settings, single-column forms — centred, max 760px. |
.soma-page-focused | One centred card for login, signup and short wizards. 400px by default, or -medium 600 / -large 800 / -xlarge 980. Size the card to the task. |
Examples
HTML
<!-- width mode on the content container (fluid needs no class) -->
<main class="soma-shell-content soma-page-fixed">…</main>
<!-- focused-task page: one centred card -->
<main class="soma-shell-content">
<div class="soma-page-focused">
<h1>Sign in</h1>
…
</div>
</main>
<!-- 12-col grid placing widgets -->
<div class="soma-grid">
<section class="soma-widget soma-col-8">…</section>
<section class="soma-widget soma-col-4">…</section>
</div>
<!-- page footer -->
<footer class="soma-footer">
<div class="soma-footer-body">
<ul><li><a href="…">Docs</a></li><li>v0.1.0</li></ul>
</div>
</footer>
CSS classes
| Class | Effect |
|---|---|
.soma-page-fixed | Centres the content container at max 1200px. |
.soma-page-narrow | Centres it at max 760px. |
.soma-page-focused | One centred card (surface, border, shadow) at 400px, for login/wizard flows. |
.soma-page-focused-medium / -large / -xlarge | Wider focused cards: 600 / 800 / 980px. |
.soma-grid | 12-column CSS grid with the token gap. |
.soma-col-1 … .soma-col-12 | Column spans. Under 900px every cell runs full width. |
.soma-footer / .soma-footer-body | Muted centred small print; the ul li list renders middot-separated. |
.soma-box-shadow | Standard floating-surface elevation for consumer-built popups. |
.soma-numeric | Mono-accent for data: the mono stack + tabular figures, so metrics, IDs and timestamps align and don't jitter when they tick (what stat values, meter readouts, log timestamps and diff gutters use built-in). |
.soma-hidden | display: none. |
.soma-assistive | Visually hidden but readable by assistive technology. |
JavaScript
None. All layout is CSS. (The live width-mode demo above is three lines of page script toggling the classes.)