Re: [csswg-drafts] [css-values-5] Caching CSS random() values in custom functions (#13661)

When you use 'random()' in a typed arg or local, I agree with your proposal: we definitely gotta use the arg/local property name, and including the function name as well provides better deduping insurance. I'm gonna go ahead and accept that.

I disagree that a typed *return value* should resolve the same way, using "result" as the property name. The return value type is meant as just a debugging tool, to ensure you are returning the right value type (so devtools can potentially warn you that you're making a mistake); it shouldn't have a meaningful effect on the value itself. That case should work the same as an untyped return value, taking its property name/index post-substitution. Does that sound reasonable?

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


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

Received on Wednesday, 15 April 2026 20:55:38 UTC