Skip to content

Commit

Permalink
Rephrase errors for numbers that must be unitless or % (#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Sep 28, 2023
1 parent 23f0143 commit 00823e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/functions/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ double _percentageOrUnitless(SassNumber number, num max, String name) {
value = max * number.value / 100;
} else {
throw SassScriptException(
'\$$name: Expected $number to have no units or "%".');
'\$$name: Expected $number to have unit "%" or no units.');
}

return value.clamp(0, max).toDouble();
Expand Down

0 comments on commit 00823e0

Please sign in to comment.