|
|
|
|
|
by jordwest
1757 days ago
|
|
This selector has saved me an inordinate amount of time hacking together UIs quickly: .vertical-stack > :not(:last-child) {
margin-bottom: 8px
}
Just add the class to a parent and all the children will have spaced between, but no spacing around the edges. It’s then easy to add padding to the parent: <div class=“vertical-stack”>
<h1>Heading</h1>
<p>Paragraph</p>
<p>Paragraph</p>
</div>
|
|
edit: realise this is at the end of the article so you probably already know this