<===> README.md
We have to pass at least one argument in a variable to avoid being parsed as
plain-CSS max().
<===>
================================================================================
<===> one_arg/input.scss
$arg: 1;
a {b: max($arg)}
<===> one_arg/output.css
a {
b: 1;
}
<===>
================================================================================
<===> two_args/input.scss
$arg: 1;
a {b: max($arg, 2)}
<===> two_args/output.css
a {
b: 2;
}
<===>
================================================================================
<===> three_args/input.scss
$arg: 1;
a {b: max(3, $arg, 2)}
<===> three_args/output.css
a {
b: 3;
}
<===>
================================================================================
<===> units/same/input.scss
$arg: 6px;
a {b: max($arg, 2px, 10px)}
<===> units/same/output.css
a {
b: 10px;
}
<===>
================================================================================
<===> units/compatible/input.scss
$arg: 1px;
a {b: max($arg, 1in, 1cm)}
<===> units/compatible/output.css
a {
b: 1in;
}
<===>
================================================================================
<===> units/and_unitless/input.scss
$arg: 2px;
a {b: max($arg, 1)}
<===> units/and_unitless/output.css
a {
b: 2px;
}
<===>
================================================================================
<===> error/type/arg_1/input.scss
$arg: c;
a {b: max($arg)}
<===> error/type/arg_1/error
Error: c is not a number.
,
2 | a {b: max($arg)}
| ^^^^^^^^^
'
input.scss 2:7 root stylesheet
<===> error/type/arg_1/error-libsass
Error: "c" is not a number for `max'
on line 2:7 of input.scss, in function `max`
from line 2:7 of input.scss
>> a {b: max($arg)}
------^
<===>
================================================================================
<===> error/type/arg_2/input.scss
$arg: c;
a {b: max(1, $arg)}
<===> error/type/arg_2/error
Error: c is not a number.
,
2 | a {b: max(1, $arg)}
| ^^^^^^^^^^^^
'
input.scss 2:7 root stylesheet
<===> error/type/arg_2/error-libsass
Error: "c" is not a number for `max'
on line 2:7 of input.scss, in function `max`
from line 2:7 of input.scss
>> a {b: max(1, $arg)}
------^
<===>
================================================================================
<===> error/type/arg_3/input.scss
$arg: c;
a {b: max(1, 2, $arg)}
<===> error/type/arg_3/error
Error: c is not a number.
,
2 | a {b: max(1, 2, $arg)}
| ^^^^^^^^^^^^^^^
'
input.scss 2:7 root stylesheet
<===> error/type/arg_3/error-libsass
Error: "c" is not a number for `max'
on line 2:7 of input.scss, in function `max`
from line 2:7 of input.scss
>> a {b: max(1, 2, $arg)}
------^
<===>
================================================================================
<===> error/too_few_args/input.scss
a {b: max()}
<===> error/too_few_args/error
Error: At least one argument must be passed.
,
1 | a {b: max()}
| ^^^^^
'
input.scss 1:7 root stylesheet
<===>
================================================================================
<===> error/incompatible_units/input.scss
$arg: 1px;
a {b: max($arg, 2s)}
<===> error/incompatible_units/error
Error: 1px and 2s have incompatible units.
,
2 | a {b: max($arg, 2s)}
| ^^^^^^^^^^^^^
'
input.scss 2:7 root stylesheet
<===> error/incompatible_units/error-libsass
Internal Error: Incompatible units: 'px' and 's'.