SASS/SCSS Starter Kit
The @mixin font-size() defines the size of the font in pixels. It takes two arguments, the first is the font size in pixels and the second is the line height. If the line height is set to normal, the letter spacing is set to normal. If the line height is set to a higher value, then the letter spacing is proportionally increased.
Shortcut: scss.mixin.font.size
@mixin font-size($font-size, $line-height: normal, $letter-spacing: normal) {
font-size: $font-size * 1px;
@if $line-height==normal {
line-height: normal;
} @else {
line-height: $line-height / $font-size;
}
@if $letter-spacing==normal {
letter-spacing: normal;
} @else {
letter-spacing: #{$letter-spacing / $font-size}em;
}
}