Re: [csswg-drafts] [css-mixins] `<dashed-function>` syntax seems invalid (#10558)

Re: your whitespace comment, there's a bit more, too. Here's the syntax, currently:

```
&lt;@function> = @function <<function-name>> [ ( <<parameter-list>> ) ]?
 [ using ( <<dependency-list>> ) ]?
 [ returns <<type>> ]?
{
 <<declaration-rule-list>>
}

In addition to the `using` detail (`using ()` is allowed, `using()` is illegal), the main parameters are *also* separate and optional, so `@function --foo ()` is allowed, but `@function --foo()` is illegal.

This seems odd; in JS, `function foo() {...}` is, I think, the most common syntactic form (even tho `function foo () {...}` is allowed in JS, too). I think we should probably at minimum switch to that; possibly we can allow both forms, if useful. This is a novel syntactic form, so even tho it's kinda unprecedented, that might still be acceptable.

@andruud , did you intend to write both of these locations with that whitespace, or was it unintended?

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


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

Received on Friday, 12 July 2024 22:12:07 UTC