mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 05:41:14 +01:00
commit
6e4b2223d3
@ -62,6 +62,12 @@
|
||||
|
||||
* Properly handle a backslash followed by a CRLF sequence in a quoted string.
|
||||
|
||||
* Fix numbers divided by colors.
|
||||
|
||||
* Support slash-separated numbers in arguments to plain CSS functions.
|
||||
|
||||
* Error out if a function is passed an unknown named parameter.
|
||||
|
||||
## 1.0.0-alpha.8
|
||||
|
||||
* Add the `content-exists()` function.
|
||||
|
@ -438,8 +438,7 @@ class SassNumber extends Value {
|
||||
return _multiplyUnits(this.value / other.value, this.numeratorUnits,
|
||||
this.denominatorUnits, other.denominatorUnits, other.numeratorUnits);
|
||||
}
|
||||
if (other is! SassColor) return super.dividedBy(other);
|
||||
throw new SassScriptException('Undefined operation "$this / $other".');
|
||||
return super.dividedBy(other);
|
||||
}
|
||||
|
||||
Value unaryPlus() => this;
|
||||
|
@ -1351,6 +1351,7 @@ class _PerformVisitor
|
||||
/// when applied to [arguments].
|
||||
void _verifyArguments(int positional, Map<String, dynamic> named,
|
||||
ArgumentDeclaration arguments, FileSpan span) {
|
||||
var namedUsed = 0;
|
||||
for (var i = 0; i < arguments.arguments.length; i++) {
|
||||
var argument = arguments.arguments[i];
|
||||
if (i < positional) {
|
||||
@ -1360,8 +1361,9 @@ class _PerformVisitor
|
||||
"name.",
|
||||
span);
|
||||
}
|
||||
} else if (argument.defaultValue == null &&
|
||||
!named.containsKey(argument.name)) {
|
||||
} else if (named.containsKey(argument.name)) {
|
||||
namedUsed++;
|
||||
} else if (argument.defaultValue == null) {
|
||||
throw _exception("Missing argument \$${argument.name}.", span);
|
||||
}
|
||||
}
|
||||
@ -1377,7 +1379,7 @@ class _PerformVisitor
|
||||
span);
|
||||
}
|
||||
|
||||
if (arguments.arguments.length - positional < named.length) {
|
||||
if (namedUsed < named.length) {
|
||||
var unknownNames = normalizedSet(named.keys)
|
||||
..removeAll(arguments.arguments.map((argument) => argument.name));
|
||||
throw _exception(
|
||||
|
Loading…
x
Reference in New Issue
Block a user