repeat() and minmax() in Grid
Generate multiple grid tracks and define flexible size ranges using repeat() and minmax().
repeat() in Grid Context
repeat(count, track-size) is a CSS Grid function that generates multiple track definitions without repetition. It works inside grid-template-columns and grid-template-rows.
repeat() with Fixed Count
Create 4 equal columns:
.grid {
grid-template-columns: repeat(4, 1fr);
/* equivalent to: 1fr 1fr 1fr 1fr */
}All lessons in this course
- calc() for Dynamic Calculations
- min() max() and clamp() for Fluid Values
- repeat() and minmax() in Grid
- color-mix() and relative color syntax