Prototype

Shell and alignment

The shell

  • Pin the product to the visible window with fixed inset-0, not h-dvh. h-dvh came out far shorter than the window in some embedded views and cut the sidebar and rows off mid-page.
  • One element scrolls: the content column. The shell, sidebar and header never scroll with it.
  • Anything that appears only in some states (a sidebar toggle shown when the sidebar is hidden) goes in a zero-height sticky holder, so showing or hiding it never moves the page.
  • Collapsing the sidebar must not shift the content column. If it does, something in flow is appearing in its place.

Alignment

  • Every element on a screen lines up to one content edge. Build that in with a shared container and gap tokens; do not nudge individual pieces.
  • Never use negative margins to cancel a Life component's own padding. If the inset does not match, record a gap and contain the hover fill inside a clipped frame instead.
  • Centre a group in a header by anchoring to the content row of the header, not the whole header. PageHeader's page variant has 24px above and 12px below its row, so a layer centred on the full box sits high. Inset the layer by those amounts.
  • A label next to an icon needs a line box equal to the icon box. A 13px label with 18px line height beside a 16px icon leaves dead space under both. Use a block-level flex row, a fixed icon box and a matching line height.
  • Table columns that should read as columns have fixed widths and the same left edge on every row. Do not let content width decide them.

Run the overlay audit

Before handoff, run the alignment-overlay-audit skill's checklist over any new header, row or toolbar. Check narrow widths for anything centred or absolutely positioned: it can overlap its neighbours.

Panel edges and surfaces

  • Each panel has one border. Sidebar and RightPane draw their own edge, so never add a border on the shell or on a wrapper beside them. A doubled line is the usual sign of this.
  • Set the edge colour on the panel through its className, so the sidebar and the right pane match (border-sv-border-default).
  • Pick one surface role per panel and write it in GAPS.md: the shell fills with primary, and a prototype that wants the sidebar, centre and right pane to match overrides that on WorkspaceDemo. Panels that share a fill are separated only by their borders, so make the borders consistent. The composer stays a primary surface on top.

One corner radius

  • When the user asks for one corner radius across a screen (for example 12px), decide it first and apply it to lists, buttons, fields and dialogs together, then log the wrapper in GAPS.md. Rows inside a boxed list stay square (no radius); only the first and last follow the list's corners, so dividers run straight.
  • Life's defaults are 16 (boxed list), 10 (row) and 8 (button, field). Expect to override all of them, and expect to override again in each dialog because dialogs render outside the wrapper.

Scroll areas

  • A scrolling region reaches its container's edge with a thin scrollbar on that edge, never floating inside padding. If the container pads its body, cancel the padding on the scroll area in the component, not in the prototype, and record the gap if you cannot.
  • A scroll area must not clip borders, focus rings or hover fills: pad the content to the padded edge and keep the scrollbar outside it.