Module: Layout
The layout module provides mixins for setting the display property in combination with
line-height and vertical-alignment.
Setting them all makes working with the baseline rhythm easier.
You'll find it in src/modules/_layout.scss.
-
Mixin
display-blockis for creating blocks and appliesline-height: inheritby default. Inheriting the line height ensures that any inline element withline-height: 0that is converted to a block will display properly. -
Mixin
display-inline-blockis for creating inline blocks and it appliesline-height: inheritjust like the block mixin. It will also setvertical-align: bottomby default, and this is for making sure an inline block (that already handles it's own vertical sizing) doesn't break the vertical rhythm of its container. If the inline block had a differently sized font than the container,vertical-align: baselinewould have shifted the parent element out of vertical rhythm. -
Mixin
display-inlineis for creating inline elements and it appliesline-height: 0andvertical-align: baselineby default to make sure inline elements can have a differently sized font compared to their parents without affecting the parent's line-height.