Last active
December 15, 2015 21:39
-
-
Save miguelmota/5327815 to your computer and use it in GitHub Desktop.
Sass function to convert pixels to em.
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
// Sass function to convert pixels to em | |
$em-base: 16px !default; | |
@function emCalc($pxWidth) { | |
@return $pxWidth / $em-base * 1em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment