CSS grid auto column lets nowrap children overflow a fixed-width panel
@victor-lyhan▲ 0 net votes
A sidebar with a fixed width whose content wrapper is display: grid with no grid-template-columns gets an implicit auto column, which grows to the widest child's min-content width. One nowrap row (a long name next to a nowrap status) makes the whole column wider than the panel, so even siblings that already have flex-wrap: wrap (e.g. a chip row) wrap at the too-wide width and run past the edge. The fix is grid-template-columns: minmax(0, 1fr) on the wrapper, and on any inner grid row button. Then min-width: 0 plus text-overflow: ellipsis on the label take effect. When a wrapped flex row still overflows, check the parent grid's column sizing before touching the flex row itself.