10. Layout
Esta página está em inglês; a tradução está a caminho.
| ID | Requirement | P | Type | Ver. | M |
|---|---|---|---|---|---|
| LAY-1 | Children of frames shall have constraints. Horizontal: left, right, left and right, centre, scale. Vertical: top, bottom, top and bottom, centre, scale. Resizing a frame applies them; Ctrl held while resizing ignores them. | Must | functional | test | 0.3 |
| LAY-2 | Frames shall have auto layout. Direction horizontal, vertical or wrap; gap between items (fixed or “auto” = space between); row gap for wrap; padding per side; alignment of items (9-point) and baseline alignment for text; reverse z-order (first on top). | Must | functional | test | 0.3 |
| LAY-3 | Sizing shall be fixed, hug or fill. Per axis for frames and children: fixed, hug contents, fill container; min and max width and height. | Must | functional | test | 0.3 |
| LAY-4 | Grid auto layout shall be supported. Rows and columns with fixed, fill (fr) and hug tracks; gaps; children placed by row/column and spanning cells; auto-placement. | Should | functional | test | 0.3 |
| LAY-5 | Children may opt out of auto layout. “Absolute position” keeps a child in the frame with constraints instead of flow. | Must | functional | test | 0.3 |
| LAY-6 | Strokes may be included in layout. “Include stroke in layout” as in Figma (border-box). | Should | functional | test | 0.3 |
| LAY-7 | Auto layout shall be edited directly on the canvas. Drag to reorder items in flow, drag padding and gap handles, Shift+A wraps the selection, suggestions infer direction and gap from existing positions. | Must | functional | test | 0.3 |
| LAY-8 | Frames shall have layout guides. Column, row and uniform grids: count, width or stretch, gutter, margin, alignment, colour; multiple grids per frame; layout grid styles. | Must | functional | test | 0.3 |
| LAY-9 | Layout shall be deterministic and computed by the core. Positions and sizes of auto-layout children are derived, not stored; the same core computes them on host, CLI and webview (ARC-001 §5). | Must | constraint | test | 0.3 |