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

> @benface Even if `if()` does accept multiple conditions, authors can still choose to nest it instead. So if you find that more readable, you can do that! Personally, I don’t, and nested parens are easy to get wrong.

How would `if()` accept multiple conditions without using `:` after the condition?

The more I think about it, the more I feel like `if(cond ? iftrue : iffalse)` is wrong, as well. I really like the ternary syntax, but I don't like that it's a special syntax that only works in a specific function. So if we can't make it work everywhere (i.e. with plain parens), I prefer the `,`-or-`;` approach (and @Loirooriol's proposal for multiple conditions is also growing on me).

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


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

Received on Monday, 24 June 2024 15:22:39 UTC