Re: [csswg-drafts] [css-values-5] What is the MVP for inline conditionals on custom properties? (#10064)

Chatted with @fantasai about the syntax. One of my examples I thought didn't work well with upgradeable commas was the "single clause, with commas in the value, and no fallback", aka `if(cond: a, b)`. This is problematic, as it ends up making the commas the clause separator (and `b` isn't a valid clause, so the whole `if()` is actually invalid).

But Elika pointed out that we want to allow a trailing semicolon *anyway* to make multi-line formatting look good, so you would be able to write `if(cond: a, b;)` to trigger the proper interpretation of the commas. This is still a *little* weird, but this case (exactly one clause, with no fallback) is already a fairly odd corner case, so I'm okay with that.

So I'm back in the camp of "let's keep our grammars as consistent with each other as possible", and using commas as the clause separators (implicitly upgradeable to semicolons, as every function is).

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


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

Received on Friday, 20 September 2024 21:55:38 UTC