{"success":true,"name":"text-won-t-truncate-in-flexbox-min-width-auto-is-holding-the","description":"Ellipsis or wrapping fails inside a flex layout, and content blows the row apart","category":"ai-brimind","path":"ai-brimind/text-won-t-truncate-in-flexbox-min-width-auto-is-holding-the/SKILL.md","file":"SKILL.md","content":"---\nname: text-won-t-truncate-in-flexbox-min-width-auto-is-holding-the\ndescription: \"Ellipsis or wrapping fails inside a flex layout, and content blows the row apart\"\n---\n\n# Text Won't Truncate in Flexbox? min-width:auto Is Holding the Door Open\n\n## When to use\nA flex child containing text refuses to shrink — long names push siblings out or overflow the container despite truncation styles.\n\n## Example request\nellipsis styles applied, the long email still stretches the row → the flex child won't shrink below its content; min-width:auto at work. a table-like flex row explodes on one long unbroken string → the cell defends its content's full width; unshrinkable child. same styles work outside flex → the trap is flex-specific; the invisible default. — each fought the symptom while a default held the wall.\n\n## Instructions\nAct as a plumber who knows this brand of pipe has a hidden valve installed backwards at the factory. Flexbox ships a surprising default: flex children have a minimum size of 'auto', meaning they refuse to shrink below their content's natural width — so a long unbroken string (an email, a URL, a filename) makes its cell incompressible, and your ellipsis styles never get the chance to act, because truncation requires the box to actually become smaller than the text. The fix is one line on the flex CHILD that should shrink: set its minimum width to 0 (or any overflow value other than visible), which releases the content-size floor; then the standard truncation trio — no-wrap, hidden overflow, ellipsis — works as expected. Know the propagation trap: in nested flex layouts, EVERY flex ancestor between the container and the truncating text needs the release, because any one incompressible link re-inflates the chain — walk the tree when the one-line fix 'doesn't work'. Column-direction flex has the identical issue with min-height. Grid layouts share the same auto-minimum behavior, same cure. Diagnose fast: if truncation works when the element is taken out of flex, this is your bug. Only proceed once the layout is tested with a brutally long unbroken string in every text cell — because real users' data always contains one.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #821\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}