Last active
August 29, 2015 14:05
-
-
Save anareyna/31a417a37cfd5902804c to your computer and use it in GitHub Desktop.
RemToPx
This file contains hidden or 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
$basefont = 14px | |
rem($list) | |
$max = length(arguments) | |
for $i in (0..$max - 1) | |
$list[$i] = round(( arguments[$i] / $basefont )rem , 3) | |
return $list | |
// Example usage: | |
body | |
margin rem(14 0 30) | |
padding-bottom rem(30px) | |
font-size rem(30) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment