Skip to content
Español

Navigate

Type to search. Press Escape to close.

    Foundations

    Layout

    Four primitives cover most pages. Each exposes a local custom property, and the finite utilities adjust columns, gaps and alignment per breakpoint.

    CSS: layout and utilities (in ivolt.css and in core.css). No JavaScript. Utilities: a finite matrix, no scanner and no purge.

    Container

    iv-container centres content with fluid gutters. --narrow uses the reading measure, --wide allows 1440px.

    The containerfixtures/layout/container.htmlOpen alone — The container
    <div class="iv-container iv-container--narrow iv-card iv-card--flat"><div class="iv-card__body">Narrow: reading measure (68ch).</div></div>
    <div class="iv-container iv-card iv-card--flat iv-u-mt-4"><div class="iv-card__body">Default: 75rem max.</div></div>
    <div class="iv-container iv-container--wide iv-card iv-card--flat iv-u-mt-4"><div class="iv-card__body">Wide: 90rem (1440px) max.</div></div>

    Stack and cluster

    iv-stack lays children vertically with --iv-stack-gap; iv-cluster wraps inline items with --iv-cluster-gap.

    Stack and clusterfixtures/layout/stack-cluster.htmlOpen alone — Stack and cluster
    <div class="iv-stack" style="--iv-stack-gap: var(--iv-space-6)">
      <h3 class="iv-u-m-0">Stack (vertical rhythm)</h3>
      <p class="iv-u-m-0">Children are spaced with <code>--iv-stack-gap</code>. Nested layouts keep their own gap.</p>
      <div class="iv-cluster">
        <span class="iv-button iv-button--secondary iv-button--sm">Cluster item</span>
        <span class="iv-button iv-button--secondary iv-button--sm">Wraps</span>
        <span class="iv-button iv-button--secondary iv-button--sm">On narrow</span>
        <span class="iv-button iv-button--secondary iv-button--sm">Viewports</span>
      </div>
    </div>
    .iv-root {
      --iv-stack-gap: var(--iv-space-6);
    }

    Grid

    iv-grid is a CSS grid with one column by default. Set columns with iv-u-grid-cols-N and responsive prefixes, or use iv-grid--auto with --iv-grid-min for auto-fit columns.

    The grid primitivefixtures/layout/grid.htmlOpen alone — The grid primitive
    <div class="iv-grid iv-u-gap-4 iv-u-grid-cols-1 iv-u-md-grid-cols-2 iv-u-lg-grid-cols-4">
      <div class="iv-card iv-card--flat"><div class="iv-card__body">1</div></div>
      <div class="iv-card iv-card--flat"><div class="iv-card__body">2</div></div>
      <div class="iv-card iv-card--flat"><div class="iv-card__body">3</div></div>
      <div class="iv-card iv-card--flat"><div class="iv-card__body">4</div></div>
    </div>
    <div class="iv-grid iv-grid--auto iv-u-gap-4 iv-u-mt-6" style="--iv-grid-min: 14rem">
      <div class="iv-card iv-card--flat"><div class="iv-card__body">auto</div></div>
      <div class="iv-card iv-card--flat"><div class="iv-card__body">auto</div></div>
      <div class="iv-card iv-card--flat"><div class="iv-card__body">auto</div></div>
    </div>
    .iv-root {
      --iv-grid-min: 14rem;
    }

    Utilities

    The matrix is finite and generated; no arbitrary values, scanner or purge step. Responsive prefixes exist only for sm md lg xl and only on the groups marked below.

    GroupClassesResponsive
    Displayiv-u-block inline inline-block flex inline-flex grid hiddenyes
    Flexiv-u-flex-row|col, flex-wrap|nowrap, items-*, justify-*, grow, shrink-0direction only
    Gridiv-u-grid-cols-1…6,12, col-span-1…6,12,fullyes
    Gapiv-u-gap-0…12, gap-x-*, gap-y-*gap only
    Spacingiv-u-m|mt|mb|ms|me|mx|my-0…12,auto, p|pt|pb|ps|pe|px|py-0…12 (logical sides)no
    Widthiv-u-w-full w-auto max-w-measure max-w-contentno
    Textiv-u-text-start|center|end, text-xs…2xl, font-normal…bold, text-muted, truncatealignment only
    Visibilityiv-u-sr-only, iv-u-sr-only-focusableno

    Utilities are emitted with a doubled selector (specificity 0,2,0) and loaded last, so they win over component modifiers in both the layered and the flat stylesheet.

    Subgrid and deferred rendering

    New in 1.1 Two layout helpers that lean on modern CSS and degrade to what 1.0 did.

    iv-grid--subgrid, together with iv-grid: each child spans --iv-subgrid-rows rows (3 by default) of the parent grid with grid-template-rows: subgrid, so the title, the text and the footer of every card share the same row lines and stay aligned across the row however long each one is. The gap between those rows is --iv-subgrid-gap. An engine without subgrid keeps a plain grid inside each child, which is the 1.0 look. It lives in the components layer because it reorders components.

    <div class="iv-grid iv-grid--subgrid iv-u-gap-4 iv-u-md-grid-cols-3">
      <article class="iv-card iv-card--link iv-u-p-5">
        <h3 class="iv-card__title">…</h3> <p>…</p> <span class="iv-card__raise">…</span>
      </article>
      …
    </div>

    See it running on the card page.

    iv-defer sets content-visibility: auto with contain-intrinsic-size: auto var(--iv-defer-size, 40rem): the browser skips the layout and paint of a block until it comes near the viewport, reserving 40rem (or your value) meanwhile so the scrollbar does not jump. Find in page, anchors and assistive technology still reach the text. Use it on long pages with heavy sections below the fold — a footer full of links, a long changelog, a gallery — and not on the first screen, where it saves nothing. The motion page runs it inside a stage.

    Class index

    Parts and modifiers of this family that the examples above do not show. The full list per stylesheet lives in the reference.

    ClassWhat it does
    iv-stack--centerCentres the children of a stack on the inline axis.