<===> integer/input.scss
a {b: round(1)}
<===> integer/output.css
a {
b: 1;
}
<===>
================================================================================
<===> up/high/input.scss
a {b: round(2.9)}
<===> up/high/output.css
a {
b: 3;
}
<===>
================================================================================
<===> up/point_five/input.scss
a {b: round(16.5)}
<===> up/point_five/output.css
a {
b: 17;
}
<===>
================================================================================
<===> up/negative/input.scss
a {b: round(-5.4)}
<===> up/negative/output.css
a {
b: -5;
}
<===>
================================================================================
<===> up/to_zero/input.scss
a {b: round(-0.2)}
<===> up/to_zero/output.css
a {
b: 0;
}
<===>
================================================================================
<===> up/within_precision/input.scss
// This is the smallest number that's representable as a float and in the
// precision range to be considered equal to 5.
a {b: round(0.4999999999900001)}
<===> up/within_precision/output.css
a {
b: 1;
}
<===>
================================================================================
<===> down/low/input.scss
a {b: round(2.2)}
<===> down/low/output.css
a {
b: 2;
}
<===>
================================================================================
<===> down/negative/input.scss
a {b: round(-5.6)}
<===> down/negative/output.css
a {
b: -6;
}
<===>
================================================================================
<===> down/to_zero/input.scss
a {b: round(0.2)}
<===> down/to_zero/output.css
a {
b: 0;
}
<===>
================================================================================
<===> down/within_precision/input.scss
// This is the largest number that's representable as a float and outside the
// precision range to be considered equal to 5.
a {b: round(1.49999999999)}
<===> down/within_precision/output.css
a {
b: 1;
}
<===>
================================================================================
<===> preserves_units/options.yml
:warning_todo:
- sass/libsass#2887
<===> preserves_units/input.scss
a {b: round(7px / 4em) * 1em}
<===> preserves_units/output.css
a {
b: 2px;
}
<===> 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: round(7px / 4em) * 1em}
| ^^^^^^^^^
'
input.scss 1:13 root stylesheet
<===>
================================================================================
<===> named/input.scss
a {b: round($number: 1.6)}
<===> named/output.css
a {
b: 2;
}
<===>
================================================================================
<===> error/type/input.scss
a {b: round(c)}
<===> error/type/error
Error: $number: c is not a number.
,
1 | a {b: round(c)}
| ^^^^^^^^
'
input.scss 1:7 root stylesheet
<===> error/type/error-libsass
Error: argument `$number` of `round($number)` must be a number
on line 1:7 of input.scss, in function `round`
from line 1:7 of input.scss
>> a {b: round(c)}
------^
<===>
================================================================================
<===> error/too_few_args/input.scss
a {b: round()}
<===> error/too_few_args/error
Error: Missing argument $number.
,--> input.scss
1 | a {b: round()}
| ^^^^^^^ invocation
'
,--> sass:math
1 | @function round($number) {
| ============== declaration
'
input.scss 1:7 root stylesheet
<===> error/too_few_args/error-libsass
Error: Function round is missing argument $number.
on line 1 of input.scss
>> a {b: round()}
------^
<===>
================================================================================
<===> error/too_many_args/input.scss
a {b: round(1, 2)}
<===> error/too_many_args/error
Error: Only 1 argument allowed, but 2 were passed.
,--> input.scss
1 | a {b: round(1, 2)}
| ^^^^^^^^^^^ invocation
'
,--> sass:math
1 | @function round($number) {
| ============== declaration
'
input.scss 1:7 root stylesheet
<===> error/too_many_args/error-libsass
Error: wrong number of arguments (2 for 1) for `round'
on line 1:7 of input.scss
>> a {b: round(1, 2)}
------^