JohnAlbin / normalize-scss

This is the Sass version of Normalize.css, a collection of HTML element and attribute rulesets to normalize styles across all browsers.
https://github.com/JohnAlbin/normalize-scss#latest-versions
MIT License
1.44k stars 254 forks source link

Fix broken leading and trailing margins on h1-h6 elements #5

Closed JohnAlbin closed 12 years ago

JohnAlbin commented 12 years ago

We're currently using a single ruleset for h1, h2, h3, h4, h5, h6 to apply a leading and trailing vertical rhythm unit. And if the compiled CSS was in px that would work. But the compiled CSS is in em which means the margins are relative to the font size of the heading, i.e. all the margins are wrong.

We need to pass the font-size to the leader() and trailer() mixins for each heading.