Skip to content

Instantly share code, notes, and snippets.

@pfulton
Created February 16, 2012 19:47
Show Gist options
  • Save pfulton/1847314 to your computer and use it in GitHub Desktop.
Save pfulton/1847314 to your computer and use it in GitHub Desktop.
A quick & dirty relative font-sizing mixin.
// quick relative font-sizing mixin.
// I wrote this before finding Anthony Short's awesome StitchCSS gem: https://github.com/anthonyshort/stitch-css/
// his relative font-sizing function is here: https://github.com/anthonyshort/stitch-css/blob/master/stylesheets/stitch/patterns/text/_rem.scss
$base-font-size: 16px;
@mixin font-sizer($font-size, $base-font-size) {
font-size: ($font-size / $base-font-size) * 1em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment