[bug] Artboard with height fit-content stays at minHeight when a child has flex-grow:1 #21

Closed
opened 2026-10-25 15:12:22 +00:00 by masi · 0 comments
Owner

Expected: A column artboard with height: fit-content grows to fit its children, as in CSS, even when one child has flex-grow:1.
Actual: It stays at its minHeight (844) and clips the content. Setting minHeight: 0 and height: fit-content again changes nothing. It only grows after setting flexGrow: 0 on the child.
Repro: create_artboard {width:"390px", height:"fit-content", minHeight:"844px"}; write_html <div style="display:flex;flex-direction:column;flex-grow:1"><div style="height:1200px"></div></div>; get_node_info shows height 844.
Workaround: set flexGrow: 0 on the child, then set height: "fit-content" on the artboard again.
Impact: Mobile screens get clipped without warning, and a growing content area plus a pinned footer can't be built.


Filed from PaperCraft 0.7.2 (macos).

**Expected:** A column artboard with `height: fit-content` grows to fit its children, as in CSS, even when one child has `flex-grow:1`. **Actual:** It stays at its `minHeight` (844) and clips the content. Setting `minHeight: 0` and `height: fit-content` again changes nothing. It only grows after setting `flexGrow: 0` on the child. **Repro:** create_artboard {width:"390px", height:"fit-content", minHeight:"844px"}; write_html `<div style="display:flex;flex-direction:column;flex-grow:1"><div style="height:1200px"></div></div>`; get_node_info shows height 844. **Workaround:** set `flexGrow: 0` on the child, then set `height: "fit-content"` on the artboard again. **Impact:** Mobile screens get clipped without warning, and a growing content area plus a pinned footer can't be built. --- Filed from PaperCraft 0.7.2 (macos).
masi closed this issue 2026-10-25 15:33:50 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: masi/papercraft#21