Re: [csswg-drafts] [css-mixins-1] Allow typed custom properties inside custom functions (#12317)

Ah man, I don't want yet another way to type specific properties.

At function has too many unexpected caveats (most unpleasant being varguments not spreading like they do in standard)

If local variables in the function body aren't registered globally, neither should be the parameters. (Current implementation parameters are being computed by the global registration)

If local variables aren't registered globally, it should be the same syntax to register them nested in the body.

Parameters aren't optional and should not have their own syntax for typing either - it should use at property from inside the function body too.

There is no reason to type result separately either if the dependency tree plainly reveals the type immediately because the var it returns is registered with at prop inside the body.

There are too many unexpected caveats and seemingly unnecessary one off syntax to replace existing methods with at function right now and it's causing a lot of friction in authoring experience.

It's an absolutely beautiful raw gem of technology in need of polishing and a tumble to make it consistent and inline with expectations of CSS (default var spreading, registration syntax, params and internal var registration consistency, ...).

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


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

Received on Thursday, 30 April 2026 00:59:04 UTC