Re: [csswg-drafts] [css-values-5] Arbitrary substitution function definition is ambiguous (#13083)

> The intended meaning is (2).

Noted.

> An ASF cannot provide parts of the [argument grammar](https://drafts.csswg.org/css-values-5/#argument-grammar) of an outer ASF by _default_ (but see the [spread syntax](https://drafts.csswg.org/css-values-5/#spread-syntax)):
> 
> > This also means that, ordinarily, parsing according to a function’s [argument grammar](https://drafts.csswg.org/css-values-5/#argument-grammar) does not see the results of any nested [arbitrary substitution functions](https://drafts.csswg.org/css-values-5/#arbitrary-substitution-function); the contents are divided into arguments based only on the values literally present inside the function.

I don't think citing the argument grammar is sufficient to disambiguate here; the issue comes up even when the argument grammar unambiguously matches:

```css
:root {
  --else: else;
  background-color: if(var(--else): red);
}
```

Chrome currently *does not* make the background red with this style.

-- 
GitHub Notification of comment by nex3
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13083#issuecomment-3517756587 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 11 November 2025 16:28:34 UTC