Responsive dashboard grids should usually change their column count before their cards become too narrow. A fixed track list, such as four fractional columns, keeps four columns even when the container no longer has room for four readable cards. The result is cramped content or horizontal overflow.
The implementation uses a repeating Grid track definition with auto-fit and a minimum-to-flexible range. The minimum is 180px, which represents the narrowest acceptable card in this fixture. The flexible maximum allows the tracks that remain on a row to share leftover space evenly.
The important decision is to put the readability threshold in the grid’s track sizing rule. auto-fit asks the browser to create as many tracks as fit. When another minimum-width track plus its gap no longer fits, Grid reduces the number of columns and reflows the same cards into another row. No card-specific breakpoint is needed for that transition.
With six cards, a wide container can resolve to four columns and two rows.…