Posts, a community app by Read.cv

Thread
 @
Replying to @joeytee

Commenting to sub to this. Someone reveal the secrets please.

joe

I thought maybe the first line’s break point was maybe being used to define max-width for subsequent lines text wrapping, but that still creates large rags!

 @
Replying to @joeytee

Nah it’s some magic for sure. I spent a solid hour trying to figure it out a couple weeks ago for my own app and ended up totally confused, and just settled on max-width.

joe

hmm sharing what @andy posted and adding that I wonder if iMessage is somehow doing this balancer thing with ideal-width and max-width on frames? (I’m just hearing ideal width for the first time as an iOS term) react-wrap-balancer.vercel.app/

React Wrap Balancer
Simple React Component That Makes Titles More Readable
Andy Chung
Replying to @joeytee

I wonder if they use something like this to balance line length. react-wrap-balancer.vercel.app/

React Wrap Balancer
Simple React Component That Makes Titles More Readable
joe
Replying to @andy

👀 reading

Linda Eliasen
Replying to @joeytee

It’s a nightmare. I remember hating this while working on Paper and I do not remember the engineering magic that got it to work 😭

PG
PG @sekei
Replying to @joeytee

Is this on the web? If so have you tried using `min-content` in combination with max width? I’m on my phone but `width: min-content; max-width: 100%;` might do it developer.mozilla.org/en-US/docs/Web…

min-content - CSS: Cascading Style Sheets | MDN
The min-content sizing keyword represents the intrinsic minimum width of the content. For text content this means that the content will take all soft-wrapping opportunities, becoming as small as the longest word.