So I have a simple stack of three paragraphs on mobile that I want to style in a grid on larger viewports, without changing the source order.
The first section might have anything from several lines to no content at all.
In this case, how do I make the first row collapse so the second row fills the space? IE when the top section is empty, the last section should appear at the top
.grid {
display: grid;
grid-template-rows: min-content auto;
grid-template-columns: 60% 40%;
grid-template-areas:
"main first"
"main last";
}
.first { grid-area: first; }
.main { grid-area: main; }
.last { grid-area: last; }
<div class="grid">
<b class="first">Grant me revenge!</b>
<b class="main">Arnold ipsum. Just bodies. I need your clothes, your boots, and your motorcycle. Grant me revenge! And if you do not listen, then to HELL with you. Make it quick because my horse is getting tired. Come on don't bullshit me. Into the tunnel. Bring your toy back to the carpet.</b>
<b class="last">Make it quick because my horse is getting tired.</b>
</div>