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.
|
* 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
|
## 1.0.0-alpha.8
|
||||||
|
|
||||||
* Add the `content-exists()` function.
|
* Add the `content-exists()` function.
|
||||||
|
@ -438,8 +438,7 @@ class SassNumber extends Value {
|
|||||||
return _multiplyUnits(this.value / other.value, this.numeratorUnits,
|
return _multiplyUnits(this.value / other.value, this.numeratorUnits,
|
||||||
this.denominatorUnits, other.denominatorUnits, other.numeratorUnits);
|
this.denominatorUnits, other.denominatorUnits, other.numeratorUnits);
|
||||||
}
|
}
|
||||||
if (other is! SassColor) return super.dividedBy(other);
|
return super.dividedBy(other);
|
||||||
throw new SassScriptException('Undefined operation "$this / $other".');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Value unaryPlus() => this;
|
Value unaryPlus() => this;
|
||||||
|
@ -1351,6 +1351,7 @@ class _PerformVisitor
|
|||||||
/// when applied to [arguments].
|
/// when applied to [arguments].
|
||||||
void _verifyArguments(int positional, Map<String, dynamic> named,
|
void _verifyArguments(int positional, Map<String, dynamic> named,
|
||||||
ArgumentDeclaration arguments, FileSpan span) {
|
ArgumentDeclaration arguments, FileSpan span) {
|
||||||
|
var namedUsed = 0;
|
||||||
for (var i = 0; i < arguments.arguments.length; i++) {
|
for (var i = 0; i < arguments.arguments.length; i++) {
|
||||||
var argument = arguments.arguments[i];
|
var argument = arguments.arguments[i];
|
||||||
if (i < positional) {
|
if (i < positional) {
|
||||||
@ -1360,8 +1361,9 @@ class _PerformVisitor
|
|||||||
"name.",
|
"name.",
|
||||||
span);
|
span);
|
||||||
}
|
}
|
||||||
} else if (argument.defaultValue == null &&
|
} else if (named.containsKey(argument.name)) {
|
||||||
!named.containsKey(argument.name)) {
|
namedUsed++;
|
||||||
|
} else if (argument.defaultValue == null) {
|
||||||
throw _exception("Missing argument \$${argument.name}.", span);
|
throw _exception("Missing argument \$${argument.name}.", span);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1377,7 +1379,7 @@ class _PerformVisitor
|
|||||||
span);
|
span);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arguments.arguments.length - positional < named.length) {
|
if (namedUsed < named.length) {
|
||||||
var unknownNames = normalizedSet(named.keys)
|
var unknownNames = normalizedSet(named.keys)
|
||||||
..removeAll(arguments.arguments.map((argument) => argument.name));
|
..removeAll(arguments.arguments.map((argument) => argument.name));
|
||||||
throw _exception(
|
throw _exception(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user