Skip to content

merge_pr_50903

Compare
Choose a tag to compare
@github-actions github-actions released this 24 Feb 12:31

[functions] Parameters with defaults need not be trailing (WPT)

It's syntactically valid to define a function where a parameter without
a default appears after a parameter with a default, for example:

@function --foo(--x:1px, --y, --z:2px) { ... }

There is currently no way to actually invoke such a function while
making use of the non-trailing defaults, but apparently this may change
in the future if we rework how IACVT works for arguments.
Invoking --foo(var(--unknown), 42px) would make the containing
declaration invalid at computed-value time, but in the future
the argument may "capture" this invalid state, and instead trigger
the default.

Bug: 389974127
Change-Id: I8d7c41bde2401ac89ec0a011f098e6051772f7b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6281007
Commit-Queue: Anders Hartvoll Ruud andruud@chromium.org
Reviewed-by: Steinar H Gunderson sesse@chromium.org
Cr-Commit-Position: refs/heads/main@{#1423827}