- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Mon, 14 Dec 2020 21:29:14 +0000
- To: public-houdini-archive@w3.org
> Using an initialization dictionary also allows you to mix and match We have numeric types already for precisely this reason - if you want percentages, you can just pass a `CSS.percent(10)` as the value. I don't think an initialization dict, in general, is the best pattern here - most of the arguments are required, and there's already a well-known and established order for them, coming from CSS (and re-expressed right in the name). So I'm pretty confident positional is still the right way to go here, at least for the simple functions. (`color()` might get a different treatment.) > So I'm voting in favor of option 4 above Given that taking raw numbers is a pure convenience (rather than only taking the CSSStyleValue objects that it'll expose post-construction), I'm *really* loathe to do tricky stuff like that and have the numbers be interpreted in different ways depending on the function. It's just begging for people to hold wrong. My current spec text is doing option 2 (raw JS numbers are always 0-1 percentages, but CSSRGB accepts `CSS.number(127)` as well). -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1014#issuecomment-744721985 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 14 December 2020 21:29:15 UTC