Move pxToRem to functions partial

This commit is contained in:
Ned Zimmerman
2020-02-16 14:32:54 -07:00
parent 1c1e82bdc6
commit 7620d29d9d
2 changed files with 13 additions and 15 deletions

View File

@ -0,0 +1,11 @@
@function pxToRem($pixels, $context: $browser-context) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}
@if (unitless($context)) {
$context: $context * 1px;
}
@return $pixels / $context * 1rem;
}