How the adjacent sibling selector can solve complex design requirements while maintaining readable CSS.
This is one of those web development tasks that starts simple but gets complicated in the process: Applying vertical margins to elements inside an article, for example a blog post that consists of compiled markdown.
Most of the time, you have to deal with exceptions and dependencies: Headlines and images need more whitespace. But if an image follows another image, there should be less whitespace between them. The whitespace between an
... read the whole story at hackernoon.com.
h2 and an
h3 should be larger than between an
h2 and a paragraph. And so on.