The Mode Contract, live

Everything painted below is resolved by the standard, in your browser, right now. The sample UI's CSS reads only the standard's variables (var(--color-action-primary-background), …); the looks are fixture theme records rendered by the same themeToCss shown in Render themes in your app, ranked by @layer app, author, viewer and resolved by ordinary inheritance — no merge engine, per the Mode Contract. It's the rendering half of publication customization on AT Protocol: the mini feed below is exactly how a publication — say, one built on standard.site — carries its author's look into any reader, while the reader's own preference still wins. Flip a control, then switch tabs to see the same change twice: painted in the sample UI, and as the exact CSS emitted per layer.

Modeful

A card, painted by whoever wins

This body text takes text.secondary's size, weight, family, and line height; the headline above takes text.primary's. The card is surface.secondary on the page's surface.primary.

A caption in text.auxiliary — the smallest accessible text.

A nested surface.auxiliary inset, inside the card, inside the page.

Fragment: com.demo.easter/color

This section's marker selects one aspect of one expression: Easter's colors apply here, while its typography keeps inheriting from the enclosing scope (Rule 4). Turn the viewer on: these colors stay — they're set directly on this element, beating a baseline merely inherited from above — but the viewer's typography flows in.

Nested scope: back to default

An inner data-mode="default" inside the Easter region. Its rules re-declare the variables for this subtree and everything else inherits — nesting is ordinary CSS inheritance, no merge logic (Rule 8). Whichever default wins by layer paints this island too.

Mini feed — two authors, one marker

Each post is an <article> holding its author's look in a <style> bounded by a prelude-less @scope, with the post content marked data-mode="default" just inside it (Rule 7) — so Alice's deep blue and Bob's toasted peach can't leak into each other or this chrome. It's the same shape a standard.site publication would use to travel with its author's look. Turn the viewer on: it overrides both default posts — layers beat scope proximity, and that's the standard's accessibility guarantee working as designed, not a leak. The third post shows the other side: a publication serving its own specific expression, which a generic viewer baseline slides past.

My posts travel with my look — deep blue, my default. Its color aspect is complete (all 21 intents), so it fully paints this card — buttons included.

alice.example · color aspect only — typography fills through

And mine with mine — toasted peach and terracotta. Same marker as Alice's post, same author layer; only @scope keeps us apart.

bob.example · color aspect only — typography fills through

My zine serves the expression com.alice.zine, so this card carries that marker instead of default. Your own default doesn't match it — turn the viewer on and these greens hold while only typography flows in (Rules 4–5). To restyle this, you'd save your own theme at com.alice.zine — reserved, not locked.

zine.alice.example · expression com.alice.zine · color aspect only