Skip to content

Barefoot CSS v8.0

Resilience & coexistence

Three things v7 assumed away: that text stops where you wrote it, that Barefoot owns the document, and that paper is a narrow screen. This page proves the answers — boxes that absorb a ~30% German expansion, a contract for living next to another framework's reset, and print that is either full or cut, never a clipped half.

Back to the conformance demo · keyboard · coexistence docs · elastic docs · print docs.

Elastic — expansion, not direction, breaks layouts

Two identical 10rem cells. The plain button's longest word is wider than the cell, so it overflows. The elastic button (.bf-elastic) clamps itself between a floor and the readable measure and breaks the word instead. Swap the language and watch the row below reflow — no media query, no JS.

Plain <button>

.bf-elastic button

measuring…

The elastic row

.bf-elastic-row wraps and lets its items shrink below their min-content — the trap that otherwise forces the row as wide as its longest label.

The elastic card

Deployment target

https://eu-central-1.example.internal/deployments/2026-q3/preprod-blue/gateway

Coexistence — the one silent casualty

Layered styles lose to unlayered ones, so a co-loaded reset that sets outline: none on a broad :focus defeats Barefoot's ring on every element at once. Focus the box and inject the reset — the ring vanishes and Verify names the offender. Layer the same one line and the ring comes back.

Focus me, then Tab away and back. The ring is Barefoot's :focus-visible, painted from the base cascade layer.

Verify at rest: no contract violations.

@layer reset, tokens, base, components, utilities, user; /* ^ imported from components/coexistence.css — `user` is last, so your @layer user { ... } overrides always win, no !important. */

Print — full or cut

A six-column table is wider than the page. data-print="cols-3" cuts it to its first three columns on paper (and only on paper — the full table stays on screen); cells wrap whatever does not fit, so nothing is lost. The bar below is .bf-no-print — it never reaches paper.

Screen-only chrome. Open print preview and this disappears, the table cuts to three columns, and the page gains a 2rem margin from @page.
Deployments — prints its first three columns
ServiceEnvironmentDeploysLeadRegionNotes
gatewayproduction12Adaeu-central-1Canary at 20%
billingstaging7Graceus-east-2Awaiting review
searchpreview3Linusap-southeast-1Expires in 48h