- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Wed, 03 Mar 2021 00:32:26 +0000
- To: public-css-archive@w3.org
> @tabatkins has been making us all use the CSS comma only for separating list items. Sigh, I'd appreciate you not pretending I'm being an unreasonable ogre. The point that @fantasai and I have made is that functions are just named chunks of CSS syntax, so they should work by the same rules that CSS syntax does anywhere else. Acting like they're traditional JS functions or whatever, where every argument *must* be separated by commas because there is no other way to distinguish values from each other, is just silly. We have guidelines for how to use commas so CSS has a consistent look and feel, and people don't have to memorize *even more* custom syntax. But we can always violate the guidelines if *necessary*, if the confusion from following it strictly is worse than the confusion of violating the guideline. Notably, lists of parallel grammar chunks are fine to use commas with, and guess what, that's exactly what we're looking at here. If we're *definitely* sticking with only two items, it can be reasonably argued either way based on the details, but I think here it's pretty important that it be clear the % is associated with the first item, and using a comma will definitely help with that. Also, the parallel with [cross-fade()](https://drafts.csswg.org/css-images-4/#cross-fade-function) *strongly* suggests you should use the same syntax and separate the chunks with commas. Separating the additional info (colorspace) from the rest with a comma also makes sense, just like how gradients or shape functions do with their prelude info; as has been argued here, it prevents accidentally reading them as applying to the first item in the list. But *within* that prelude, if we have more pieces of info, they probably won't use additional commas, because CSS doesn't need to do that to distinguish grammar bits. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6050#issuecomment-789325610 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 3 March 2021 00:32:28 UTC