diff --git a/spec/core_functions/math/atan2/arguments.hrx b/spec/core_functions/math/atan2/arguments.hrx index 8b36e2a89c..9e7ccc93ad 100644 --- a/spec/core_functions/math/atan2/arguments.hrx +++ b/spec/core_functions/math/atan2/arguments.hrx @@ -1,5 +1,3 @@ -<===> -================================================================================ <===> named_args/input.scss @use "sass:math" as math; a {b: math.atan2($y: 1, $x: -1)} @@ -55,7 +53,7 @@ Error: $x: "0" is not a number. a {b: math.atan2(1px, 1deg)} <===> error/incompatible_units/error -Error: Incompatible units deg and px. +Error: $x: 1deg and $y: 1px have incompatible units. , 2 | a {b: math.atan2(1px, 1deg)} | ^^^^^^^^^^^^^^^^^^^^^ @@ -69,7 +67,7 @@ Error: Incompatible units deg and px. a {b: math.atan2(1, 1px)} <===> error/unitless_y/error -Error: $y is unitless but $x has unit px. Arguments must all have units or all be unitless. +Error: $x: 1px and $y: 1 have incompatible units (one has units and the other doesn't). , 2 | a {b: math.atan2(1, 1px)} | ^^^^^^^^^^^^^^^^^^ @@ -83,7 +81,7 @@ Error: $y is unitless but $x has unit px. Arguments must all have units or all b a {b: math.atan2(1px, 1)} <===> error/unitless_x/error -Error: $y has unit px but $x is unitless. Arguments must all have units or all be unitless. +Error: $x: 1 and $y: 1px have incompatible units (one has units and the other doesn't). , 2 | a {b: math.atan2(1px, 1)} | ^^^^^^^^^^^^^^^^^^ diff --git a/spec/core_functions/math/clamp.hrx b/spec/core_functions/math/clamp.hrx index a652d980ea..3af6ec3ea6 100644 --- a/spec/core_functions/math/clamp.hrx +++ b/spec/core_functions/math/clamp.hrx @@ -155,7 +155,7 @@ Error: $max: "0" is not a number. a {b: math.clamp(1deg, 1px, 1turn)} <===> error/incompatible_units/min_and_number/error -Error: Incompatible units px and deg. +Error: $number: 1px and $min: 1deg have incompatible units. , 2 | a {b: math.clamp(1deg, 1px, 1turn)} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -169,7 +169,7 @@ Error: Incompatible units px and deg. a {b: math.clamp(1deg, 1turn, 1px)} <===> error/incompatible_units/min_and_max/error -Error: Incompatible units px and deg. +Error: $max: 1px and $min: 1deg have incompatible units. , 2 | a {b: math.clamp(1deg, 1turn, 1px)} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -183,7 +183,7 @@ Error: Incompatible units px and deg. a {b: math.clamp(1turn, 1deg, 1px)} <===> error/incompatible_units/number_and_max/error -Error: Incompatible units px and turn. +Error: $max: 1px and $min: 1turn have incompatible units. , 2 | a {b: math.clamp(1turn, 1deg, 1px)} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -197,7 +197,7 @@ Error: Incompatible units px and turn. a {b: math.clamp(1deg, 1px, 1s)} <===> error/incompatible_units/all/error -Error: Incompatible units s and deg. +Error: $number: 1px and $min: 1deg have incompatible units. , 2 | a {b: math.clamp(1deg, 1px, 1s)} | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -211,7 +211,7 @@ Error: Incompatible units s and deg. a {b: math.clamp(0, 1px, 2px)} <===> error/some_unitless/min/error -Error: $min is unitless but $number has unit px. Arguments must all have units or all be unitless. +Error: $number: 1px and $min: 0 have incompatible units (one has units and the other doesn't). , 2 | a {b: math.clamp(0, 1px, 2px)} | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -225,7 +225,7 @@ Error: $min is unitless but $number has unit px. Arguments must all have units o a {b: math.clamp(0px, 1, 2px)} <===> error/some_unitless/number/error -Error: $min has unit px but $number is unitless. Arguments must all have units or all be unitless. +Error: $number: 1 and $min: 0px have incompatible units (one has units and the other doesn't). , 2 | a {b: math.clamp(0px, 1, 2px)} | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -239,7 +239,7 @@ Error: $min has unit px but $number is unitless. Arguments must all have units o a {b: math.clamp(0px, 1px, 2)} <===> error/some_unitless/max/error -Error: $min has unit px but $max is unitless. Arguments must all have units or all be unitless. +Error: $max: 2 and $min: 0px have incompatible units (one has units and the other doesn't). , 2 | a {b: math.clamp(0px, 1px, 2)} | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -253,7 +253,7 @@ Error: $min has unit px but $max is unitless. Arguments must all have units or a a {b: math.clamp(0, 1, 2px)} <===> error/some_unitless/min_and_number/error -Error: $min is unitless but $max has unit px. Arguments must all have units or all be unitless. +Error: $max: 2px and $min: 0 have incompatible units (one has units and the other doesn't). , 2 | a {b: math.clamp(0, 1, 2px)} | ^^^^^^^^^^^^^^^^^^^^^ @@ -267,7 +267,7 @@ Error: $min is unitless but $max has unit px. Arguments must all have units or a a {b: math.clamp(0, 1px, 2)} <===> error/some_unitless/min_and_max/error -Error: $min is unitless but $number has unit px. Arguments must all have units or all be unitless. +Error: $number: 1px and $min: 0 have incompatible units (one has units and the other doesn't). , 2 | a {b: math.clamp(0, 1px, 2)} | ^^^^^^^^^^^^^^^^^^^^^ @@ -281,7 +281,7 @@ Error: $min is unitless but $number has unit px. Arguments must all have units o a {b: math.clamp(0px, 1, 2)} <===> error/some_unitless/number_and_max/error -Error: $min has unit px but $number is unitless. Arguments must all have units or all be unitless. +Error: $number: 1 and $min: 0px have incompatible units (one has units and the other doesn't). , 2 | a {b: math.clamp(0px, 1, 2)} | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/spec/core_functions/math/cos.hrx b/spec/core_functions/math/cos.hrx index 47eda337b0..7ec638d255 100644 --- a/spec/core_functions/math/cos.hrx +++ b/spec/core_functions/math/cos.hrx @@ -112,7 +112,7 @@ Error: $number: "0" is not a number. a {b: math.cos(1px)} <===> error/unit/error -Error: $number: Expected 1px to be an angle. +Error: $number: Expected 1px to have an angle unit (deg, grad, rad, turn). , 2 | a {b: math.cos(1px)} | ^^^^^^^^^^^^^ diff --git a/spec/core_functions/math/hypot.hrx b/spec/core_functions/math/hypot.hrx index b9fcebb6e3..32f5f4b204 100644 --- a/spec/core_functions/math/hypot.hrx +++ b/spec/core_functions/math/hypot.hrx @@ -107,7 +107,7 @@ Error: "0" is not a number. a {b: math.hypot(1deg, 1px, 1turn)} <===> error/incompatible_units/first_and_second/error -Error: Incompatible units px and deg. +Error: $numbers[2]: 1px and $numbers[1]: 1deg have incompatible units. , 2 | a {b: math.hypot(1deg, 1px, 1turn)} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -121,7 +121,7 @@ Error: Incompatible units px and deg. a {b: math.hypot(1deg, 1turn, 1px)} <===> error/incompatible_units/first_and_third/error -Error: Incompatible units px and deg. +Error: $numbers[3]: 1px and $numbers[1]: 1deg have incompatible units. , 2 | a {b: math.hypot(1deg, 1turn, 1px)} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -135,7 +135,7 @@ Error: Incompatible units px and deg. a {b: math.hypot(1turn, 1deg, 1px)} <===> error/incompatible_units/second_and_third/error -Error: Incompatible units px and turn. +Error: $numbers[3]: 1px and $numbers[1]: 1turn have incompatible units. , 2 | a {b: math.hypot(1turn, 1deg, 1px)} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -149,7 +149,7 @@ Error: Incompatible units px and turn. a {b: math.hypot(1turn, 1px, 1s)} <===> error/incompatible_units/all/error -Error: Incompatible units px and turn. +Error: $numbers[2]: 1px and $numbers[1]: 1turn have incompatible units. , 2 | a {b: math.hypot(1turn, 1px, 1s)} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -163,7 +163,7 @@ Error: Incompatible units px and turn. a {b: math.hypot(0, 1px, 2px)} <===> error/some_unitless/first/error -Error: Argument 1 is unitless but argument 2 has unit px. Arguments must all have units or all be unitless. +Error: $numbers[2]: 1px and $numbers[1]: 0 have incompatible units (one has units and the other doesn't). , 2 | a {b: math.hypot(0, 1px, 2px)} | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -177,7 +177,7 @@ Error: Argument 1 is unitless but argument 2 has unit px. Arguments must all hav a {b: math.hypot(0px, 1, 2px)} <===> error/some_unitless/second/error -Error: Argument 1 has unit px but argument 2 is unitless. Arguments must all have units or all be unitless. +Error: $numbers[2]: 1 and $numbers[1]: 0px have incompatible units (one has units and the other doesn't). , 2 | a {b: math.hypot(0px, 1, 2px)} | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -191,7 +191,7 @@ Error: Argument 1 has unit px but argument 2 is unitless. Arguments must all hav a {b: math.hypot(0px, 1px, 2)} <===> error/some_unitless/third/error -Error: Argument 1 has unit px but argument 3 is unitless. Arguments must all have units or all be unitless. +Error: $numbers[3]: 2 and $numbers[1]: 0px have incompatible units (one has units and the other doesn't). , 2 | a {b: math.hypot(0px, 1px, 2)} | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -205,7 +205,7 @@ Error: Argument 1 has unit px but argument 3 is unitless. Arguments must all hav a {b: math.hypot(0, 1, 2px)} <===> error/some_unitless/first_and_second/error -Error: Argument 1 is unitless but argument 3 has unit px. Arguments must all have units or all be unitless. +Error: $numbers[3]: 2px and $numbers[1]: 0 have incompatible units (one has units and the other doesn't). , 2 | a {b: math.hypot(0, 1, 2px)} | ^^^^^^^^^^^^^^^^^^^^^ @@ -219,7 +219,7 @@ Error: Argument 1 is unitless but argument 3 has unit px. Arguments must all hav a {b: math.hypot(0, 1px, 2)} <===> error/some_unitless/first_and_third/error -Error: Argument 1 is unitless but argument 2 has unit px. Arguments must all have units or all be unitless. +Error: $numbers[2]: 1px and $numbers[1]: 0 have incompatible units (one has units and the other doesn't). , 2 | a {b: math.hypot(0, 1px, 2)} | ^^^^^^^^^^^^^^^^^^^^^ @@ -233,7 +233,7 @@ Error: Argument 1 is unitless but argument 2 has unit px. Arguments must all hav a {b: math.hypot(0px, 1, 2)} <===> error/some_unitless/second_and_third/error -Error: Argument 1 has unit px but argument 2 is unitless. Arguments must all have units or all be unitless. +Error: $numbers[2]: 1 and $numbers[1]: 0px have incompatible units (one has units and the other doesn't). , 2 | a {b: math.hypot(0px, 1, 2)} | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/spec/core_functions/math/max.hrx b/spec/core_functions/math/max.hrx index 533a8673e2..426e182f79 100644 --- a/spec/core_functions/math/max.hrx +++ b/spec/core_functions/math/max.hrx @@ -155,7 +155,7 @@ a {b: max($arg, 2s)} <===> error/incompatible_units/error -Error: Incompatible units s and px. +Error: 2s and 1px have incompatible units. , 2 | a {b: max($arg, 2s)} | ^^^^^^^^^^^^^ diff --git a/spec/core_functions/math/min.hrx b/spec/core_functions/math/min.hrx index f51c2afa94..9e15ab832d 100644 --- a/spec/core_functions/math/min.hrx +++ b/spec/core_functions/math/min.hrx @@ -154,7 +154,7 @@ $arg: 1px; a {b: min($arg, 2s)} <===> error/incompatible_units/error -Error: Incompatible units s and px. +Error: 2s and 1px have incompatible units. , 2 | a {b: min($arg, 2s)} | ^^^^^^^^^^^^^ diff --git a/spec/core_functions/math/sin.hrx b/spec/core_functions/math/sin.hrx index f42fd48f73..53863caeae 100644 --- a/spec/core_functions/math/sin.hrx +++ b/spec/core_functions/math/sin.hrx @@ -156,7 +156,7 @@ Error: $number: "0" is not a number. a {b: math.sin(1px)} <===> error/unit/error -Error: $number: Expected 1px to be an angle. +Error: $number: Expected 1px to have an angle unit (deg, grad, rad, turn). , 2 | a {b: math.sin(1px)} | ^^^^^^^^^^^^^ diff --git a/spec/core_functions/math/tan.hrx b/spec/core_functions/math/tan.hrx index b7b0650dc0..ed57d8a429 100644 --- a/spec/core_functions/math/tan.hrx +++ b/spec/core_functions/math/tan.hrx @@ -178,7 +178,7 @@ Error: $number: "0" is not a number. a {b: math.tan(1px)} <===> error/unit/error -Error: $number: Expected 1px to be an angle. +Error: $number: Expected 1px to have an angle unit (deg, grad, rad, turn). , 2 | a {b: math.tan(1px)} | ^^^^^^^^^^^^^ diff --git a/spec/core_functions/meta/load_css/error.hrx b/spec/core_functions/meta/load_css/error.hrx index 545779afd4..136045dc62 100644 --- a/spec/core_functions/meta/load_css/error.hrx +++ b/spec/core_functions/meta/load_css/error.hrx @@ -531,7 +531,7 @@ Error: Expected expression. a {b: 1px + 1em} <===> from_other/runtime/error -Error: Incompatible units em and px. +Error: 1em and 1px have incompatible units. , 1 | a {b: 1px + 1em} | ^^^^^^^^^ diff --git a/spec/directives/forward/error/with.hrx b/spec/directives/forward/error/with.hrx index 4582b21308..ea61f6c965 100644 --- a/spec/directives/forward/error/with.hrx +++ b/spec/directives/forward/error/with.hrx @@ -127,7 +127,7 @@ Error: This variable is available from multiple global modules. $a: c !default; <===> invalid_expression/error/error -Error: Incompatible units em and px. +Error: 1em and 1px have incompatible units. , 1 | @forward "upstream" with ($a: 1px + 1em); | ^^^^^^^^^ diff --git a/spec/directives/use/error/with.hrx b/spec/directives/use/error/with.hrx index 0c89bb7e4f..7a55570dcc 100644 --- a/spec/directives/use/error/with.hrx +++ b/spec/directives/use/error/with.hrx @@ -104,7 +104,7 @@ Error: This variable is available from multiple global modules. $a: c !default; <===> invalid_expression/error/error -Error: Incompatible units em and px. +Error: 1em and 1px have incompatible units. , 1 | @use "other" with ($a: 1px + 1em); | ^^^^^^^^^ diff --git a/spec/libsass-closed-issues/issue_1577.hrx b/spec/libsass-closed-issues/issue_1577.hrx index e792cac1e5..11022915de 100644 --- a/spec/libsass-closed-issues/issue_1577.hrx +++ b/spec/libsass-closed-issues/issue_1577.hrx @@ -4,14 +4,14 @@ $foo: 10%; // line 1 $error: $foo + 20px; // line 3 <===> error -Error: Incompatible units: 'px' and '%'. - on line 3 of input.scss - Use --trace for backtrace. - -<===> error-dart-sass -Error: Incompatible units px and %. +Error: 20px and 10% have incompatible units. , 3 | $error: $foo + 20px; // line 3 | ^^^^^^^^^^^ ' input.scss 3:9 root stylesheet + +<===> error-libsass +Error: Incompatible units: 'px' and '%'. + on line 3 of input.scss + Use --trace for backtrace. diff --git a/spec/non_conformant/errors/for-incompatible-units-fn.hrx b/spec/non_conformant/errors/for-incompatible-units-fn.hrx index 0ebc518483..72fe1e9568 100644 --- a/spec/non_conformant/errors/for-incompatible-units-fn.hrx +++ b/spec/non_conformant/errors/for-incompatible-units-fn.hrx @@ -5,15 +5,15 @@ foo { bar: test(); } <===> error -Error: Incompatible units: 'px' and '%'. - on line 2 of input.scss - Use --trace for backtrace. - -<===> error-dart-sass -Error: Incompatible units % and px. +Error: Expected 100% to have a length unit (in, cm, pc, mm, q, pt, px). , 2 | @for $i from 100% through 42px {} | ^^^^ ' input.scss 2:16 test() input.scss 5:12 root stylesheet + +<===> error-libsass +Error: Incompatible units: 'px' and '%'. + on line 2 of input.scss + Use --trace for backtrace. diff --git a/spec/non_conformant/errors/for-incompatible-units.hrx b/spec/non_conformant/errors/for-incompatible-units.hrx index 7eca0572b1..d29b3c5f49 100644 --- a/spec/non_conformant/errors/for-incompatible-units.hrx +++ b/spec/non_conformant/errors/for-incompatible-units.hrx @@ -1,12 +1,7 @@ <===> input.scss @for $i from 100% through 42px {} <===> error -Error: Incompatible units: 'px' and '%'. - on line 1 of input.scss - Use --trace for backtrace. - -<===> error-dart-sass -Error: Incompatible units % and px. +Error: Expected 100% to have a length unit (in, cm, pc, mm, q, pt, px). , 1 | @for $i from 100% through 42px {} | ^^^^ diff --git a/spec/non_conformant/errors/invalid-operation/sub.hrx b/spec/non_conformant/errors/invalid-operation/sub.hrx index 8b199d3768..599f57bc79 100644 --- a/spec/non_conformant/errors/invalid-operation/sub.hrx +++ b/spec/non_conformant/errors/invalid-operation/sub.hrx @@ -3,14 +3,9 @@ test { err: 2px - 2px*2px; } <===> error -Error: Incompatible units: 'px' and ''. - on line 2 of input.scss - Use --trace for backtrace. - -<===> error-dart-sass -Error: Incompatible units px*px and px. +Error: 4px*px and 2px have incompatible units. , -2 | err: 2px - 2px*2px; +2 | err: 2px - 2px*2px; | ^^^^^^^^^^^^^ ' input.scss 2:8 root stylesheet