Skip to content

Commit

Permalink
Print the LHS first in incompatible unit errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Dec 29, 2020
1 parent 91b9cb3 commit f45c000
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion spec/core_functions/math/max.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ a {b: max($arg, 2s)}


<===> error/incompatible_units/error
Error: 2s and 1px have incompatible units.
Error: 1px and 2s have incompatible units.
,
2 | a {b: max($arg, 2s)}
| ^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/math/min.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ $arg: 1px;
a {b: min($arg, 2s)}

<===> error/incompatible_units/error
Error: 2s and 1px have incompatible units.
Error: 1px and 2s have incompatible units.
,
2 | a {b: min($arg, 2s)}
| ^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion spec/core_functions/meta/load_css/error.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ Error: Expected expression.
a {b: 1px + 1em}

<===> from_other/runtime/error
Error: 1em and 1px have incompatible units.
Error: 1px and 1em have incompatible units.
,
1 | a {b: 1px + 1em}
| ^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion spec/directives/forward/error/with.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Error: This variable is available from multiple global modules.
$a: c !default;

<===> invalid_expression/error/error
Error: 1em and 1px have incompatible units.
Error: 1px and 1em have incompatible units.
,
1 | @forward "upstream" with ($a: 1px + 1em);
| ^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion spec/directives/use/error/with.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Error: This variable is available from multiple global modules.
$a: c !default;

<===> invalid_expression/error/error
Error: 1em and 1px have incompatible units.
Error: 1px and 1em have incompatible units.
,
1 | @use "other" with ($a: 1px + 1em);
| ^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion spec/libsass-closed-issues/issue_1577.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $foo: 10%; // line 1
$error: $foo + 20px; // line 3

<===> error
Error: 20px and 10% have incompatible units.
Error: 10% and 20px have incompatible units.
,
3 | $error: $foo + 20px; // line 3
| ^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion spec/non_conformant/errors/invalid-operation/sub.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ test {
err: 2px - 2px*2px;
}
<===> error
Error: 4px*px and 2px have incompatible units.
Error: 2px and 4px*px have incompatible units.
,
2 | err: 2px - 2px*2px;
| ^^^^^^^^^^^^^
Expand Down

0 comments on commit f45c000

Please sign in to comment.