Skip to main content
Copy for LLM

Content-Edge Spine

The content-edge spine is the vertical X-coordinate where every page-level WireKit primitive's inline content begins. Top-level wrappers reading --padding-wk-x-lg for their inline padding share this coordinate by default — so a brand logo inside <x-wirekit::brand-bar> sits on the same vertical line as the first paragraph rendered by <x-wirekit::main>, the first column inside <x-wirekit::footer>, the first heading inside <x-wirekit::cta>, and so on.

This page is the canonical contract for spine participation: which components participate, which DON'T, and how to opt a developer-authored custom component into the spine.

Why the spine matters

Without a shared spine, every page-level component picks its own inline padding. Visually this produces a jagged left edge — the logo flush-left at, say, 1.5 rem, but the first paragraph 2.5 rem in, and the footer columns starting at 1 rem. The eye tracks the misalignment as visual noise.

With the spine, every component reads the SAME --padding-wk-x-lg token. A developer overriding the token in :root {} re-aligns every participant in lockstep. Layout authoring becomes "compose the primitives, set the spine value once, done" instead of per-component pixel tuning.

Participating components

Component Spine padding token Participates? Notes
<x-wirekit::brand-bar> --padding-wk-x-lg (default padding="lg") YES Page-chrome header. Default padding tier matches main / footer / cta.
<x-wirekit::main> --padding-wk-x-lg (default padding="lg") YES Primary content area. The spine's anchor — every other participant's left edge aligns with main's first body paragraph.
<x-wirekit::container> --padding-wk-x-lg (default padding="lg") YES Generic content wrapper. Since v2.0.0, container's inline-padding migrated from --space-wk-* to --padding-wk-x-* specifically to join the spine.
<x-wirekit::navbar> --padding-wk-x-lg (on the outer row) YES Page-chrome navigation. The one participant that widens its own cap: with container=true the max-width grows by twice the padding, so the navbar's content box lands on the tier rather than its outer edge, and its links sit on the same spine as every other page-edge component.
<x-wirekit::header> --padding-wk-x-lg YES Layout-primitive header (distinct from <x-wirekit::brand-bar>).
<x-wirekit::footer> --padding-wk-x-lg YES Page footer. Column-grid, brand+legal row, and default slot all read the same inner max-width PLUS the spine padding.
<x-wirekit::cta> --padding-wk-x-lg YES Call-to-action banner. Spine-aligned so the CTA title lines up with the body text above it.
<x-wirekit::spine-aware> --padding-wk-x-lg (default tier="lg") YES Opt-in helper wrapper for developer-authored components — pass slot content and it joins the spine. Reads the canonical --padding-wk-x-lg via the WireKit::spinePadding('lg') helper. Pass tier="sm" / "md" / "xl" to read a different --padding-wk-x-* tier (deliberately steps off the page-edge spine).
<x-wirekit::hero> --padding-wk-x-lg (outer); inner copy/aside flex layout has its own padding OUTER-ONLY See Hero internal layout below.
<x-wirekit::section> depends on padding prop OPT-IN When padding="lg", participates. Other tiers (sm / md / xl) deliberately step off the spine — useful for visually-distinct full-width sections.
<x-wirekit::shell-bar> --padding-wk-x-lg (default padding="lg") YES The aligned head of a shell column. On the content column it carries the spine, so a page title in the bar sits on the same vertical line as the first paragraph of main below it. padding="none" deliberately steps off — that is the rail's head, whose content is a centered mark rather than text on the spine, and padding="sm" matches the sidebar's own narrower tier.
<x-wirekit::sidebar> --padding-wk-x-sm (smaller tier) DIFFERENT-TIER The sidebar's inboard edge aligns with main's inner edge (the spine), but the sidebar's OWN inline padding is sm so its content fits in a narrower column. Not the spine itself; an adjacent tier.
<x-wirekit::reading-toc> (with flush prop) none (zero horizontal padding) OFF-SPINE In flush mode the reading-TOC strip runs viewport-edge-to-viewport-edge — zero horizontal padding on the nav, the inner list, AND the first / last link. The strip's chrome (background + bottom border) and the visible "Features" / "Pricing" / "…" text both run flush to the viewport boundary. Deliberately off-spine: the strip is a chrome surface, not a content-edge participant. Without flush the strip reads --reading-toc-padding-x for its inner list padding (dedicated reading-* tier, currently 1rem).

The YES / OUTER-ONLY / OPT-IN / DIFFERENT-TIER markers are anti-drift enforced — a change to a YES component's Blade template that drops the --padding-wk-x-lg reference fails the upstream build until either the component re-joins the spine OR the table row's marker flips.

Hero internal layout

The hero is the one ambiguous case in the participant table. Its outer <section> reads --padding-wk-x-lg, so the hero container's left edge aligns with brand-bar / main / footer / etc. above and below — outer-spine participation works as expected.

But INSIDE the hero, the copy / aside flex layout adds its own inner padding (column gap, optional aside max-width). For the balanced (50/50) and lead (60/40) layouts, the hero's <h1> title sits inside an inner flex column whose left edge is one column-gap inboard of the outer section padding. The title text does NOT sit on the spine.

For developers who need hero title text to sit exactly on the spine:

{{-- Use layout="stacked" — removes the inner column-flex padding --}}
<x-wirekit::hero layout="stacked">
    <x-slot:title>Title text sits on the spine</x-slot:title>
    <x-slot:lede>Lede text also spine-aligned.</x-slot:lede>
</x-wirekit::hero>

OR wrap with explicit container control:

{{-- Force the spine by composing inside <x-wirekit::container> --}}
<x-wirekit::container max="xl" padding="lg">
    <h1 class="font-bold text-3xl">Spine-aligned title</h1>
    <p>Spine-aligned lede.</p>
    <x-wirekit::button>Spine-aligned action</x-wirekit::button>
</x-wirekit::container>

The CHANGELOG entry for v2.0.0 said "brand visible-text aligns with article body below" — this is TRUE for body-text-rendered-by-<x-wirekit::main>. It is NOT TRUE for hero's internal title positioning in balanced / lead layouts. The contract documented here makes the asymmetry explicit so future developers don't measure the discrepancy by hand.

Stability tiers

Each participation marker carries a stability commitment:

Tier Meaning Components
Lockstep-enforced The upstream build fails if the component's blade template drops --padding-wk-x-lg. Reliable across minor versions. brand-bar, main, container, header, footer, cta, navbar, shell-bar, spine-aware
Outer-only enforced The OUTER section is lockstep-enforced to read --padding-wk-x-lg; the inner layout's spine asymmetry is documented (see above) but not guarded — the inner shape can evolve in a minor release if needed. hero
Opt-in Participation is the developer's choice via the prop value — no enforcement. section (only when padding="lg")
Different tier Component reads a related-but-distinct token. Spine alignment is incidental, not contractual. sidebar (reads --padding-wk-x-sm)
Off-spine Deliberately zero or non-spine padding. Chrome surface, not a content-edge participant. reading-toc (with flush prop: zero padding viewport-edge-to-viewport-edge)

How to extend — developer-authored components

For a developer-authored custom component that wants to join the spine, the canonical path is <x-wirekit::spine-aware> — a thin Blade wrapper that emits the spine padding for you:

<x-wirekit::spine-aware>
    {{-- your content sits on the spine with no manual class wrangling --}}
    <h1>Spine-aligned headline</h1>
    <p>Spine-aligned body.</p>
</x-wirekit::spine-aware>

For more control, use the WireKit::spinePadding(string $tier) helper directly in any class string:

<div class="{{ \Pushery\WireKit\WireKit::spinePadding('lg') }} mt-8 mb-4">
    {{-- spine-aligned content with extra surrounding spacing --}}
</div>

Both options route through the canonical --padding-wk-x-lg token. Hand-typing px-[var(--padding-wk-x-lg)] works too, but the helper protects against tier typos (--padding-wk-x-mg instead of lg) and gives the drift-audit guard a single canonical detection target.

Manual path — for backwards-compatibility with v2.0.x developer code that hand-types the token:

  1. Read --padding-wk-x-lg for inline padding. In Blade:

    <div class="px-[var(--padding-wk-x-lg)]">
        {{-- spine-aligned content --}}
    </div>
    
  2. Don't add inner padding before the first content child. A nested wrapper with its own px-… shifts the visible text off the spine.

  3. Reference <x-wirekit::brand-bar>'s blade source as a model. The brand-bar reads --padding-wk-x-lg via its padding="lg" default and applies it consistently across both container-wrapped and edge-to-edge modes — the canonical reference implementation.

  4. Developer-tunable. Override --padding-wk-x-lg once in your :root {} block to re-align every participant simultaneously:

    :root {
        --padding-wk-x-lg: 2rem;  /* every spine participant shifts to 2rem inline padding */
    }
    

See Also

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store