<===> zero/input.scss
a {b: abs(0)}
<===> zero/output.css
a {
b: 0;
}
<===>
================================================================================
<===> positive/integer/input.scss
a {b: abs(1)}
<===> positive/integer/output.css
a {
b: 1;
}
<===>
================================================================================
<===> positive/decimal/input.scss
a {b: abs(5.6)}
<===> positive/decimal/output.css
a {
b: 5.6;
}
<===>
================================================================================
<===> negative/integer/input.scss
a {b: abs(-17)}
<===> negative/integer/output.css
a {
b: 17;
}
<===>
================================================================================
<===> negative/decimal/input.scss
a {b: abs(-123.456)}
<===> negative/decimal/output.css
a {
b: 123.456;
}
<===>
================================================================================
<===> preserves_units/options.yml
:warning_todo:
- sass/libsass#2887
<===> preserves_units/input.scss
a {b: abs(-7px / 4em) * 1em}
<===> preserves_units/output.css
a {
b: 1.75px;
}
<===> preserves_units/warning
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(-7px, 4em)
More info and automated migrator: https://sass-lang.com/d/slash-div
,
1 | a {b: abs(-7px / 4em) * 1em}
| ^^^^^^^^^^
'
input.scss 1:11 root stylesheet
<===>
================================================================================
<===> named/input.scss
a {b: abs($number: -3)}
<===> named/output.css
a {
b: 3;
}
<===>
================================================================================
<===> error/type/input.scss
a {b: abs(c)}
<===> error/type/error
Error: $number: c is not a number.
,
1 | a {b: abs(c)}
| ^^^^^^
'
input.scss 1:7 root stylesheet
<===> error/type/error-libsass
Error: argument `$number` of `abs($number)` must be a number
on line 1:7 of input.scss, in function `round`
from line 1:7 of input.scss
>> a {b: abs(c)}
------^
<===>
================================================================================
<===> error/too_few_args/input.scss
a {b: abs()}
<===> error/too_few_args/error
Error: Missing argument $number.
,--> input.scss
1 | a {b: abs()}
| ^^^^^ invocation
'
,--> sass:math
1 | @function abs($number) {
| ============ declaration
'
input.scss 1:7 root stylesheet
<===> error/too_few_args/error-libsass
Error: Function abs is missing argument $number.
on line 1 of input.scss
>> a {b: abs()}
------^
<===>
================================================================================
<===> error/too_many_args/input.scss
a {b: abs(1, 2)}
<===> error/too_many_args/error
Error: Only 1 argument allowed, but 2 were passed.
,--> input.scss
1 | a {b: abs(1, 2)}
| ^^^^^^^^^ invocation
'
,--> sass:math
1 | @function abs($number) {
| ============ declaration
'
input.scss 1:7 root stylesheet
<===> error/too_many_args/error-libsass
Error: wrong number of arguments (2 for 1) for `abs'
on line 1:7 of input.scss
>> a {b: abs(1, 2)}
------^