It doesn\'t work properly when I add auto-fit or auto-fill instead of a number.
grid-template-columns: repeat(auto-fit, minmax(max-content, max-content));
Add some width (in this example I added 'width: 100vw;' to 'ul' tag) to a tag you want a 'repeat' to apply.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
ul {
width: 100vw;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
grid-gap: 10px;
}
li {
list-style: none;
}
Add some width to a tag you want a 'repeat', 'min-max' to apply.