- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Mon, 05 Feb 2024 17:41:11 +0000
- To: public-css-archive@w3.org
> I think colon followed by value makes more sense for default arguments Hm, perhaps. ```css @function --foo( --arg1 type(<calc-length>): 1em, --arg2 type(<angle>): 90deg, ) returns type(<length>) { @return calc(var(--arg1) * (var(--arg2) / 1turn)); } ``` Yeah that doesn't look unreasonable to me. > Also, types are specified as strings in @property so having a completely different syntax here feels weird. Yeah, I'm thinking of this as an expansion of that syntax, not a replacement. I stuck with strings in `@property` so I wouldn't have to define the CSS Value Definition Syntax *in* the CSS Value Definition Syntax, but I've been noodling with it a bit and suspect it's probably reasonable. > That ship has sailed; literally all new math functions accept calculations for their arguments. Yes, that's fine, because Sass can hardcode knowledge of those functions. (Same with relative color syntax, etc.) Natalie's concern is that *custom* functions would need knowledge of the function's definition to know if the argument should be a calculation or not. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9350#issuecomment-1927571608 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 5 February 2024 17:41:14 UTC