Layout Resolve

Human appendix for meta.layoutResolve — the responsive placement engine. Every Copy AI Prompt already embeds the full machine recipe in the JSON. You still copy and paste the same way; this page is optional reading.

Copy / paste unchanged. Designer → Copy AI Prompt → paste into ChatGPT / Cursor / Claude. The clipboard includes short instructions and the complete meta.layoutResolve recipe. This doc does not replace the paste.
Open Designer Markdown mirror Runtime contract

What this is

Instead of “if mobile then stack,” PanelSpec defines a resolution algorithm shared by designer preview and AI export — priority order, formulas, and schema.

That is a stronger claim than “responsive tips”: it is a placement engine for panel UIs (not a full browser layout/paint engine).

Resolution priority

layoutVariants.devices*
        ↓
layoutConstraints (+ css / @container)
        ↓
flow: wrap | stack | grid | areas | masonry
        ↓
layoutIntent fill-width
        ↓
layoutVariants.tablet | mobileLandscape | mobile | landscape
        ↓
@media stack/fill fallback (undeclared form controls)

Highest match wins. Do not invent alternate scaling.

Constraint cascade

base layoutConstraints
        ↓
matching mediaQueries[]   (@media)
        ↓
containerQuery            (@container size | style | scroll-state)

Prefer layoutConstraints.css when present.

Formulas

Exact strings ship in meta.layoutResolve.formulas. Highlights:

KeyRole
contentBoxSafe-area padding box
fillWidth / percentWidth / fluidWidthWidth modes
wrapFlow / stackFlow / gridFlowPeer reflow
gridAreas / masonryFlowNamed areas + masonry
centerHorizontal center in content box
styleQuery / scrollStateQueryHost container overrides

Feature surface (v15)

Trust rules

Related