The grid-auto-columns property sets the size of implicit columns — columns auto-generated when grid items are placed outside the explicit grid. Takes one or more track-sizes; multiple values repeat as a pattern..grid {
grid-auto-columns: 100px;
}.gallery {
display: grid;
grid-auto-flow: column;
grid-auto-columns: minmax(160px, 1fr);
}min:0max:9999step:1units:px | em | rem | % | fr | vwautoColumn expands to fit its content (default).min-contentMinimum size that fits the content (no wrapping).max-contentMaximum size needed for unwrapped content.minmax()Range between min and max. Syntax: minmax(100px, 1fr).fit-content()Fits content up to a max size. Syntax: fit-content(200px).CSS Grid Layout Module Level 2Editor's Draft<length-percentage>W3CMDN123456Show all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationvalue typessourcesvisual demonstrationpreviousnext