chat-ui
1d14212f - Make markdown tables fill the message width (#2757)

Commit
3 days ago
Make markdown tables fill the message width (#2757) `.prose table` was `display: block` so it could scroll horizontally. A block-level table wraps its rows in an anonymous table box that shrinks to fit its content, so prose's `width: 100%` never reached the columns, and the 16rem cell cap left most tables far narrower than the message. Tables are now wrapped in a `.table-scroll` div by the marked renderer. The wrapper scrolls; the table keeps `display: table` and stretches to full width. Table margins move to the wrapper so spacing around tables is unchanged, and cells get `overflow-wrap: break-word` so long hashes and URLs wrap in place.
Author
Parents
Loading