Skip to content

autoVsAbsoluteLayout

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. position, top, bottom, start, end, centerHorizontalOffset, centerVerticalOffset, layoutSizingHorizontal, layoutSizingVertical, width, height

Operands

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

OperandFrom
node.constraints.horizontalFigma node
node.constraints.verticalFigma node
node.positionFigma node geometry
node.dimensionFigma node geometry
parent.dimensionFigma parent geometry
parent.layoutModeFigma parent
self.layoutSizingthe axis-matching sizing key
context.isRootcapture context

Cases

Ordered — first match wins.

#WhenEmitsWhy
1context.isRoot presentposition null
all six offsets null
a root has no parent bounds to be positioned within, and where a designer dragged it on the canvas is not part of its spec
2parent.layoutMode ≠ NONE and node.layoutPositioning ≠ ABSOLUTEposition AUTO
all six offsets null
a flow-placed child’s position comes from the parent’s stack, so recording offsets would assert a placement it does not have
3(parent.layoutMode = NONE or node.layoutPositioning = ABSOLUTE)layoutSizingHorizontal and layoutSizingVertical null
offsets per the per-axis table below
position ABSOLUTE when node.layoutPositioning is ABSOLUTE or any offset was set, otherwise null
an element placed by coordinates rather than a parent’s stack is absolutely positioned whatever Figma reports, because a regular frame has no stack to opt out of

Per-axis cases

Ordered — first match wins.

#WhenEmitsWhy
1node.constraints.axis = MINthe leading edge offset — start or top — set to the node position
2node.constraints.axis = MAXthe trailing edge offset — end or bottom — set to parent dimension less node position less node dimension
3node.constraints.axis = CENTERthe matching centre offset, set to node position plus half the node dimension less half the parent dimension
4node.constraints.axis = STRETCHboth edge offsets on the axis
the axis dimension suppressed
a stretched node is defined by its edges, not its size
5node.constraints.axis = SCALEboth edge offsets on the axis, as percentage strings

Ordered — first match wins.

#WhenEmitsWhy
1(self.layoutSizing = HUG or self.layoutSizing = FILL)the matching width or height nulleda hugged or filled axis has no fixed dimension to record
2self.layoutSizing = FIXEDthe matching width or height present
3self.position = ABSOLUTElayoutSizingHorizontal and layoutSizingVertical nulledan absolutely positioned child is not sized by the parent axis

Otherwise

Nothing is emitted. — a flow-placed child in auto-layout records no positioning offsets

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

Per axis. These keys are computed from constraints and geometry, never read from a single Figma property — a binding presenting them as direct reads misleads anyone implementing a second time. ADR-041 governs the constraint mapping.