diff --git a/scss/_functions.scss b/scss/_functions.scss index 9c06603150ed..8abc31164e98 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -120,6 +120,14 @@ @return $value1 + $value2; } + @if type-of($value1) != number { + $value1: unquote("(") + $value1 + unquote(")"); + } + + @if type-of($value2) != number { + $value2: unquote("(") + $value2 + unquote(")"); + } + @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2); } @@ -140,5 +148,13 @@ @return $value1 - $value2; } + @if type-of($value1) != number { + $value1: unquote("(") + $value1 + unquote(")"); + } + + @if type-of($value2) != number { + $value2: unquote("(") + $value2 + unquote(")"); + } + @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2); }