Layout and responsive: Minmax tracks
minmax defines a lower and upper track size; a zero minimum prevents intrinsic text width from forcing overflow.
Current edit
Understand the pattern
minmax defines a lower and upper track size; a zero minimum prevents intrinsic text width from forcing overflow.
minmax defines a lower and upper track size; a zero minimum prevents intrinsic text width from forcing overflow.
Misconceptions to reject
- If the page fits one desktop viewport, no narrower viewport needs checking.
- Hiding all overflow always makes content accessible.
The preview is a sanitized subset, not a full browser compatibility test.
Worked example and expected result
.layout { display: grid; }
.layout { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.layout > * { min-width: 0; }minmax defines a lower and upper track size; a zero minimum prevents intrinsic text width from forcing overflow.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Layout and responsive: Stable gapsTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.
Keep learning
- 01Layout and responsive: Repeatable card gridauto-fit repeats as many tracks as fit; the minimum controls when cards wrap.Practice
- 02Layout and responsive: Stable gapsUse gap for space between flex or grid items instead of manually adding margins to every child.Practice
- 03Layout and responsive: Intrinsic sizingA flexible image can use its natural ratio while fitting its container.Practice