domestic-ui GitHub

Edges and alignment

Our choice: every container has a few named vertical lines, written in tokens, and every item sits on one of them or has a written reason, because edges picked by eye drift by a few pixels per panel and nobody can say which was meant. No web standard covers this. The method is prior art, not a spec: Karri Saarinen's redraw of the Linear sidebar (How we redesigned the Linear UI) and the Apple Human Interface Guidelines: Layout, as packaged by the gridlines skill. Standards win any conflict: 2.5.8 Target Size (Minimum), focus outlines and forced-colors borders are never reduced to close a gap. The gap is left and written down.

  • Box line and text line. Boxed rows and controls (nav links, menu items, list rows, tabs, table rows, buttons) put their box on the container's content edge and their label one control padding in. Our choice: the box never hangs outside its container (the skill's "pull the strip in" for tabs), because a hit area or focus ring past the edge is clipped by scroll containers and goes off screen in a container with no padding.
  • Icons on one column, labels on one line. In a list, every row's icon starts on the same column and every label on the same line, whatever sits before them (an indicator bar, a disclosure marker).
  • Bars centre on one line. Items in a toolbar, app bar, dialog header or page header title row are centred on one horizontal line (align-items: center). The first item starts on the box line, the last ends on the trailing line.
  • Lines use --dui-space-* and the other semantic tokens with logical properties (padding-inline-start), never px. A line that needs a value off the scale means the container's padding is wrong.

The lines, measured from each container's inline-start edge (the trailing line mirrors the leading one unless noted):

ContainerBox lineText lineOther lines
App shell frame: <header>, sidebars, <footer>--dui-space-mbox line + the control's --dui-space-button-inline (app bar), or the nav's lines belowTrailing: --dui-space-m. Each frame region measures from its own edge
App shell <main>--dui-space-l beside a sidebar, --dui-space-m stackedsame as box line
Nav list (data-nav="vertical")the list's edge; a group's links --dui-space-m in, or on the group's label line when its summary has an icon--dui-border-width-indicator + --dui-space-control-inline for links and group summaries alikeIcon column: starts on the text line, --dui-size-icon wide, then --dui-space-gap to the label. Trailing: a group's chevron ends --dui-space-2xs inside the row
Toolbar (role="toolbar")--dui-border-width + --dui-space-gap-tightbox line + --dui-space-button-inlineOne centre line
Menus and popoversmenu items: --dui-border-width + --dui-space-gap-tight--dui-border-width + --dui-space-m (a menu: --dui-space-gap-tight + --dui-space-control-inline, equal at comfortable density)A horizontal nav's dropdown adds its --dui-border-width-indicator
Tabsthe tab list's edgebox line + --dui-space-button-inlinePanel text on the tab list's edge
Dialogs and drawers--dui-border-width + --dui-space-lsame as box lineHeader title and close button share a centre line; footer actions end on the trailing line
List-detaillist rows on the list's edgerows: --dui-border-width-emphasis + --dui-space-control-inline; detail: --dui-focus-width + --dui-focus-offset side by side (room for focus rings), its edge when stacked
Data tablerows on the table's edge; the caption on it too--dui-space-cellCheckbox column: one centre line; body rows' --dui-border-width-emphasis bar is matched by the header cell's padding. Number columns end on --dui-space-cell
Page header (data-page-header)the region's edgesame as box lineActions end on the trailing line (the edge); title and actions share a centre line

These were read from the CSS in an alignment pass on 21 November 2026 (Owen Donckers, with Claude), taking the line most rows already used. CONTRIBUTING.md explains how to run a pass.

Search