The trick is to use * 1px
when you want to add a unit. Using +px
or interpolation (#{$numericValue}px
) turns it into a string.
$numericValue: 30;
$pixelValue: $numericValue * 1px;
$calc: $pixelValue * 2;
The trick is to use * 1px
when you want to add a unit. Using +px
or interpolation (#{$numericValue}px
) turns it into a string.
$numericValue: 30;
$pixelValue: $numericValue * 1px;
$calc: $pixelValue * 2;