diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 6f3faed..c5a5fae 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -165,12 +165,20 @@ fn draw(&mut self, painter: &mut Painter) -> Size { } ``` -Across itself a span reports `leftover` if any child does; otherwise the -longest child in *frame pixels* among `px` and `rel` children, reporting -that child's own `Len`. Comparing in pixels is safe here because the frame -is decided from above and nothing feeds back; the read is a `frame_px_len` -and narrows the frame range, and at the crossover both candidates are the -same number of pixels, so the drawing is the same on either side of it. +Across itself a span reports the longest child in *frame pixels* among the +`px` and `rel` parts of its children's reports, as that child's own `Len`. +Comparing in pixels is safe here because the frame is decided from above +and nothing feeds back; the read is a `frame_px_len` and narrows the frame +range, and at the crossover both candidates are the same number of pixels, +so the drawing is the same on either side of it. A child's `leftover` +across a span contributes nothing to that: across, children overlap rather +than divide anything, so a share can only mean "as tall as the span", and +`Place::Within(None)` already fills the extent for a leftover answer. Only +when no child has a `px` or `rel` part does the span report `leftover` +itself and take its parent's room (Bryan, 2026-09-18: "returning rest if +any have it is probably fine", refined to this because it costs nothing). +So `row![text, rect]` is as tall as the text with the rect filling it, and +`row![rect, rect]` fills its column's share. The shapes the rest of the containers take (write them, they are short):