I have a custom function in Sass that takes an em value, splits the block and creates a px value:
@function stripAndPx($in){ $stripped: $in / ($in * 0 + 1);
Then I try to take the em variable:
$em-variable: 1em;
And add it to the pixel variable:
$px-variable: 20px;
Example:
right: $px-variable + (stripAndPx($em-variable));
What creates this conclusion:
right: 20px16px;
I expect both values ββto be added:
right: 36px;
Yahreen
source share