Re: [csswg-drafts] Declarative custom functions (#7490)

> 1. Arg names, arg syntaxes, and function return syntax before def block `{ }`
> 2. `@return` rule instead of `result` value
> 3. Intermediate value declarations
> 4. Intermediate logic
> 5. Recursion
> 6. Alternative invocation syntax (passing args by name vs. insertion order)

I think the idea here is to solve declarative custom functions through regular var substitution, so some of these might be difficult to achieve. There is a more fully fledged [custom function proposal in Houdini](https://github.com/w3c/css-houdini-drafts/issues/857) where the function will be defined in JS. I think that proposal would solve most of your needs.

There seems to be consensus for having arg names and syntax before the definition block, so I'll update the proposal to reflect this. 

Intermediate values and recursion might be doable, but I think the experts will have to look into that :)

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


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

Received on Saturday, 24 September 2022 09:44:12 UTC