Skip to content

Instantly share code, notes, and snippets.

@MikeGillihan
Last active January 3, 2016 09:19
Show Gist options
  • Save MikeGillihan/8441917 to your computer and use it in GitHub Desktop.
Save MikeGillihan/8441917 to your computer and use it in GitHub Desktop.
Font sizing with rem mixin. A simple Sass mixin for sizing fonts with rem plus px as a fallback.
@mixin fontsize($size: 16, $base: 16) {
font-size: $size + px;
font-size: ($size / $base) * 1rem;
}
div {
@include fontSize(14);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment