You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _verifyLength() call is correct—that function does include logic to add exceptions for var() calls. The verification logic in the protofier and the JS API tests are indeed wrong, though.
https://sass-lang.com/documentation/js-api/classes/sasscalculation/#clamp
In JS API, we can construct
clamp
with only 1 one argument.In Dart code documentation:
Then, this spec seems wrong to throw an error for requiring 3 arguments: https://github.com/sass/sass-spec/blob/e6e6762153c8c6a02d289ab078fb1186c10b91f3/js-api-spec/value/calculation.test.ts#L320-L327
Finally in dart-sass and embedded-host-node, there are extra logic in protofy and deprotofy to enforce 3 arguments:
dart-sass/lib/src/embedded/protofier.dart
Lines 352 to 362 in 6c59213
https://github.com/sass/embedded-host-node/blob/2b1f4ecaf83a9e949976427f522291f674a04a57/lib/src/protofier.ts#L383-L387
These currently makes it impossible to return a clamp with an unquoted
var()
string in custom functions.The text was updated successfully, but these errors were encountered: