CSS

Table of Contents

1. CSS libs

2. Grid

3. How to select the previous sibling?

Use :has() pseudo-class.

/*
Selects an h1 heading with a paragraph element that immediately follows
the h1 and applies the style to h1.
*/
h1:has(+ p) {
  margin-bottom: 0;
}