Skip to content

Commit

Permalink
Improve error messages for color functions that aren't in sass:color (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Oct 15, 2019
1 parent e68592f commit 6b8c168
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

* Fix a bug preventing built-in modules from being loaded within a configured
module.

* Allow `saturate()` in plain CSS files, since it can be used as a plain CSS
filter function.

* Improve the error messages for trying to access functions like `lighten()`
from the `sass:color` module.

## 1.23.0

* **Launch the new Sass module system!** This adds:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/functions/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ BuiltInCallable _removedColorFunction(String name, String argument,
{bool negative = false}) =>
BuiltInCallable(name, r"$color, $amount", (arguments) {
throw SassScriptException(
"The function $name() isn't in the new module system.\n"
"The function $name() isn't in the sass:color module.\n"
"\n"
"Recommendation: color.adjust(${arguments[0]}, \$$argument: "
"${negative ? '-' : ''}${arguments[1]})\n"
Expand Down

0 comments on commit 6b8c168

Please sign in to comment.