Created
March 30, 2013 21:12
-
-
Save alirezas/5278354 to your computer and use it in GitHub Desktop.
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
$base-font-size: 18px; | |
// Convert PX to EM | |
@function em($px, $bfs: $base-font-size){ | |
@return ($px / $bfs) + 0em; | |
} | |
// Usage: | |
body { | |
font-size: em(24px); | |
} | |
// Or for custom base font size. | |
body { | |
font-size: em(24, 14); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment