Skip to content

Instantly share code, notes, and snippets.

@madkap
Last active August 29, 2015 14:02
Show Gist options
  • Save madkap/b5b61e4ca5c4fb9253a3 to your computer and use it in GitHub Desktop.
Save madkap/b5b61e4ca5c4fb9253a3 to your computer and use it in GitHub Desktop.
Fontsize Mixin - sizing based on rem with fallback to px
html {
font-size: 62.5%; //sets fontsize to 10px
}
@mixin fontsize($size:1.6, $line: $size * 1.5){
font-size: ($size * 10) + px;
line-height: ($line * 10) + px;
font-size: $size + rem;
line-height: $line + rem;
}
@madkap
Copy link
Author

madkap commented May 30, 2014

credit: @dennis-best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment