Created
May 27, 2013 16:55
-
-
Save thomasthesecond/5658072 to your computer and use it in GitHub Desktop.
Useful SASS functions to convert pixel values to percentages or ems.
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
@function ems($target, $context) | |
{ | |
@return $target / $context * 1em | |
} | |
@function percent($target, $context) | |
{ | |
@return $target / $context * 100% | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment