A project grid that survives real titles.
Test a grid with uneven titles, narrow screens, and more than the ideal number of cards. The content should help reveal the layout’s limits.
Three short project names make almost any grid look tidy. Add “A reading room above the old workshop” and the design has a more useful test.
My first pass at a project grid includes a short title, a long one, and a summary that wraps onto several lines. I want to see the difficult case while the layout is still easy to change.
Give the columns a sensible minimum
Here is a small starting point:
.project-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
gap: 2rem;
}
.project-card {
min-width: 0;
}
.project-card__title {
overflow-wrap: anywhere;
}The columns expand when space permits and collapse as the container narrows. The inner minimum keeps the preferred card width from overflowing a smaller container. The MDN CSS grid guide explains the underlying layout model.
Test the content, not just the breakpoint
I check the grid with one project, four projects, and an incomplete final row. Then I increase the text size and follow each link by keyboard.
A longer title is not a defect to conceal with truncation. It tells me whether the layout can support the work it is supposed to present. I would rather allow an extra line than remove the words that distinguish one project from another.