Skip to content

Instantly share code, notes, and snippets.

@kenold
Last active October 23, 2019 14:31
Show Gist options
  • Save kenold/720782b88d9d8cc03fd27bc287092bef to your computer and use it in GitHub Desktop.
Save kenold/720782b88d9d8cc03fd27bc287092bef to your computer and use it in GitHub Desktop.
Font sizing & line height mixin
@mixin font-size($sizeValue: 16, $line: $sizeValue * 1.5) {
font-size: ($sizeValue) + px;
line-height: ($line) + px;
font-size: ($sizeValue / 16) + rem;
line-height: ($line / 16) + rem;
}
// credit https://coderwall.com/p/ml9zxg/sass-mixin-for-rem-font-sizing-line-height-with-px-fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment