- From: Frank Dana via GitHub <noreply@w3.org>
- Date: Fri, 31 Oct 2025 21:33:59 +0000
- To: public-css-archive@w3.org
ferdnyc has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-mixins-1] @function grammar is missing open-paren ==
The definition of the `@function` syntax is:
```html
<pre class="prod def" nohighlight>
<@function> = @function <<function-token>> <<function-parameter>>#? )
[ returns <<css-type>> ]?
{
<<declaration-rule-list>>
}
<dfn><<function-parameter>></dfn> = <<custom-property-name>> <<css-type>>? [ : <<default-value>> ]?
<dfn><<css-type>></dfn> = <<syntax-component>> | <<@function/type()>>
<dfn><<default-value>></dfn> = <<declaration-value>>
<dfn function lt="type()" for="@function"><type()></dfn> = type( <<syntax>> )
</pre>
```
The literal close-paren (`)`) that follows the `<function-parameter>` list is represented, but the _open_ paren (`(`) that should fall between the `<function-token>` and the (optional) parameter list is not.
The simplest solution is for the grammar to read:
```html
<pre class="prod def" nohighlight>
<@function> = @function <<function-token>> ( <<function-parameter>>#? )
[ returns <<css-type>> ]?
{
<<declaration-rule-list>>
}
<dfn><<function-parameter>></dfn> = <<custom-property-name>> <<css-type>>? [ : <<default-value>> ]?
<dfn><<css-type>></dfn> = <<syntax-component>> | <<@function/type()>>
<dfn><<default-value>></dfn> = <<declaration-value>>
<dfn function lt="type()" for="@function"><type()></dfn> = type( <<syntax>> )
</pre>
```
Unless `<function-token>` is meant to include the open-paren, but since it isn't defined that way anywhere (formally or informally), that seems unlikely.
(Also, it would make more sense structurally if `<function-token>` were then defined to include not only the open-paren, but also the argument list and the close-paren. Its definition could then be decomposed further.)
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13046 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 31 October 2025 21:33:59 UTC