CSS tips from Style That DOM
One technique per post, with a live example and the CSS behind it.
CSS finally lets an element react to what's inside it. No JavaScript, no toggled classes.
Two lines of CSS to center a child both ways, and why grid beats the old tricks.