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

While I agree `@property` inside `@function` would be useful, I disagree it should be the *only* way to type parameters, that seems quite unwieldy and functions should be able to be short and sweet.

It's not uncommon in the language to have shorthand forms of things to make simple things easy and longer forms to make complex things possible. It's not an antipattern. We _could_ make things more consistent though by having a short-form `@property` syntax that takes the same syntax as a function argument, e.g. `@property --foo <length>;`

I agree that globally registered properties meaning different things inside `@function` even when not in the parameter list is super weird, very surprising behavior. I wouldn't necessarily expect them to have values from the tree, but at least they should still be registered!

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


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

Received on Friday, 1 May 2026 13:38:01 UTC