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

> What was the original motivation to make everything untyped inside custom functions?

To avoid locals inside of functions having to be aware of all properties defined outside, or having to be defensively named to avoid collisions.

It would suck to write a re-usable function that used a local `--foo` variable to hold some intermediate calculation, and have that function straight up fail to work, unpredictably, on certain pages because that page also uses `--foo` for something and registered it with an incompatible type.

Also, arguments establish local variables, and they have a type, which has no need to be consistent with outside registrations either.

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


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

Received on Wednesday, 11 June 2025 16:57:32 UTC