Grid auto-placement allows items to automatically place themselves within the grid according to the defined rules. This feature is particularly useful when dealing with dynamic content.
.grid-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-flow: dense;
}
.grid-item {
background-color: lightgray;
border: 1px solid #333;
padding: 10px;
}