Skip to content

wrapping

disposition: bound, direction: figma-to-spec, basis: implementation

A rule of the Figma binding. These keys resolve jointly — no one of them determines any single output, so the rule below is the mapping.

Keys. wrap, wrapAlignment, itemSpacing, layoutMode, mainAxisAlignment, crossAxisAlignment

Operands

Every fact the rule reads. Nothing outside this set participates.

OperandFrom
node.layoutModeFigma node
node.layoutWrapFigma node
node.itemSpacingFigma node
node.counterAxisSpacingFigma node

Cases

Ordered — first match wins.

#WhenEmitsWhy
1(node.layoutMode absent or node.layoutMode = NONE)wrap false
mainAxisAlignment null
crossAxisAlignment null
wrapAlignment removed entirely
none of them mean anything without auto-layout. wrapAlignment is removed rather than nulled: the removal below also holds here, because a node with no auto-layout has no wrap either, and a first-match table that said null would describe a state no document reaches
2node.layoutWrap ≠ WRAPwrapAlignment removed entirelya dead property otherwise — removed, not nulled
3(node.layoutMode = HORIZONTAL or node.layoutMode = VERTICAL) and node.layoutWrap = WRAPitemSpacing as a biaxial composite, mapping the Figma primary and counter axes onto absolute horizontal and vertical
4node.itemSpacing presentitemSpacing as a scalar

Otherwise

Nothing is emitted.

Stage. postEvaluate — produced by a later pass, not read directly.

A property that cannot apply is removed rather than recorded as null, so a reader never sees a dead key.