Created
June 26, 2013 14:44
-
-
Save cange/5867943 to your computer and use it in GitHub Desktop.
Sass pixel to rem unit converter set by Nicole O'Sullivan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// converting a px based font-size to rem | |
@function calculate-rem($size) { | |
$rem-size: $size / $default-font-size; | |
@return #{ $rem-size }rem; | |
} | |
@mixin font-size($size) { | |
font-size: $size; | |
font-size: calcuate-rem($size); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment