Sass function that calculates margin from letter.
textMargin($top_or_bot, $margin, $fontSize, $lineHeight)
eg.: margin-bottom: textMargin('bot', 20, 2.25, 1.5);
This returns margin in "em" unit.
- $global-font-size - font size, defined for whole document (corresponding to 1 em; in px)
- $font-cap-height - capital letter proportions, when line height is 1 (proportions, without units; see image.png)
- $font-baseline - space between bottom border of line height and letter baseline, when line height is 1 (proportions, without units; see image.png)
- $top_or_bot - the margin is top or bottom?
- $margin - margin value (in px)
- $fontSize - font size (in em)
- $lineHeight - line height (proportions, eg. 1.333)
- passed values should be given in any unit