Files
outline/shared/editor/components
tsushanthandtsushanth 4122f3896c Fix image overflow in table cells by capping width with CSS min() (#12902)
Images with a stored pixel width (e.g. from paste) set an inline
style="width: 1920px" on the image-wrapper and img elements. In tables
without explicit colwidth attributes the browser uses table-layout: auto,
which lets cells expand to the element's preferred width. The existing
max-width: 100% in the ImageWrapper styled-component cannot constrain
the wrapper because 100% of the already-expanded cell is also 1920px.

Changing to width: min(Npx, 100%) breaks the expansion: during auto
table layout the browser resolves 100% against the table's available
width rather than the cell's inflated size, so the element's
min-content contribution stays bounded and the cell no longer grows
beyond its share of the table width.

Fixes #12866

Co-authored-by: tsushanth <t.sushanth@gmail.com>
2026-07-10 18:16:23 -04:00
..
2026-05-29 22:46:59 -04:00
2026-05-29 22:46:59 -04:00
2025-12-19 21:48:25 -05:00