You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$component-space: 21px;
@function components-add-margins($bot, $top) {
// Parameter validation
@if unit($bot) != "px" or unit($top) != "px" {
@error "Parameter $bot and $top are expected to be of type 'px'.";
}
$sum : ($top + $bot) % $component-space;
@if $sum <= 0 {
$sum : $sum + $component-space;
}
@return $sum;
}
This error is displayed for the "%" symbol:
Parse error at line 27 column 25: 17: /// 18: /// @param {Number} $bot - Margin in pixels 19: /// @param {Number} $top - Margin in pixels 20: /// @returns {Number} In pixels 21: @function components-add-margins($bot, $top) { 22: // Parameter validation 23: @if unit($bot) != "px" or unit($top) != "px" { 24: @error "Parameter $bot and $top are expected to be of type 'px'."; 25: } 26: 27: $sum : ($top + $bot) % $component-space; ^ 28: @if $sum <= 0 { 29: $sum : $sum + $component-space; 30: } 31: @return $sum; 32: } 33: 34: /// Substracts a margin from the standard margin and takes care that it not results less or equal 0px 35: /// 36: /// This function can handle $sub to be too large or to be negative. 37: /// @example
Sass has no problem with this syntax.
Thank you
The text was updated successfully, but these errors were encountered:
This error is displayed for the "%" symbol:
Sass has no problem with this syntax.
Thank you
The text was updated successfully, but these errors were encountered: