How do you collapse unused row in a CSS grid?
Instead of this: grid-template-rows: min-content auto Try this: grid-template-rows: min-content 1fr With 1fr you’re telling the second row to consume any and all free space available in the column. Hence, when there is no content in the .first element, the .second element takes the space. The problem with auto is that its length is relative … Read more