[bug] write_html: hug column with a centered, width:100% text gets a huge height inside an absolute parent #22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expected: a flex column with height fit-content wraps its two text children (about 108px).
Actual: right after write_html it measured 1788px tall, which pushed the content below it out of the visible area. Running update_styles {height:"fit-content"} on the same node fixed it (108px).
Repro: write_html into a 390x844 artboard:
<div style="position:absolute;left:0px;top:400px;width:390px;height:fit-content;display:flex;flex-direction:column;align-items:center;padding:24px"><div style="display:flex;flex-direction:column;align-items:center;gap:8px;width:100%"><div style="font-size:20px;line-height:28px;text-align:center">Short title</div><div style="width:100%;font-size:16px;line-height:24px;text-align:center">A sentence long enough to wrap onto two or three lines in this column.</div></div></div>, then get_tree_summary on the inner column.Workaround: update_styles {height:"fit-content"} on the inner column after the write.
Impact: sheets and dialogs render empty below the title until someone notices.
Filed from PaperCraft 0.7.2 (macos).