...

/

Solution: Section Margin Collapse Fixer

Solution: Section Margin Collapse Fixer

Let’s use CSS to apply a 1.5rem rhythm and prevent section margin collapse for consistent vertical spacing.

Problem description

You have multiple <section> elements in a document, each containing an <h2> and one or more <p> elements. Your task is to define a CSS custom property for a 1.5rem baseline rhythm and apply it to the line-height ...