Re: [csswg-drafts] [css-values-5][various] Better handling of arguments with commas (#9539)

> Worst of all: it introduces potential breakage that is hard to track down. E.g. is mix(50%, var(--foo), var(--bar)) correct? Who knows!

This applies to a "wrap the arguments in a function" case too. What you've written *also* might be correct, or not, depending on *the exact same thing* - whether the variables contain a comma or not.

In either case, an author can defensively mark the function, as `mix(50%; var(--foo); var(--bar))` or `mix(50%, item(var(--foo)), item(var(--bar)))`, and it'll be correct regardless of what the variable is.

> It introduces more inconsistency: if authors see a mix() with semicolons in the wild, it's not clear it also accepts commas and vice versa.

I'm also not sure how *this* doesn't apply to your preferred solution as well. If authors see a `mix()` with `item()`-wrapped arguments, isn't it *exactly* as unclear whether it can accept values without the `item()` wrapper too?

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


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

Received on Wednesday, 29 November 2023 20:27:32 UTC