I never struggle with flexbox itself. But getting a flexbox right in which the content overflows is always a mystery to me.
If anyone has a guide or spec how overflow rules apply in CSS, please share.
If anyone has a guide or spec how overflow rules apply in CSS, please share.
e.g. I recently made a component representing an attached file, where the flex items in its layout were:
[icon] [filename] [button]
To get long filenames to not force their container to the full length of the string, so they could be truncated by text-overflow: ellipsis, I needed to put min-width: 0; on the flex item containing the filename.*,*:before,*:after { min-width: 0}
I haven't had a single problem with it. I honestly feel this part of the spec was a mistake, given all the confusion I see. Online discussions suggest 'auto' is a counterintuitive default.