- From: Benoît Rouleau via GitHub <sysbot+gh@w3.org>
- Date: Mon, 24 Jun 2024 14:41:30 +0000
- To: public-css-archive@w3.org
> And in #9539 we already agreed on a way to separate such things: a semicolon, which can be replaced with an "implicitly upgradeable" comma in specific cases. I was not familiar with this issue, or its resolution. Now that I've read it, I think we should go for `property: if(<condition>; <value-if-true>; <value-if-false>)`. Or, if the resolution of #9539 is open to dispute, I really like the idea of plain parentheses to distinguish values (regardless of any commas they contain), and ternaries could be supported as well. So `property: (<condition> ? <value-if-true> : <value-if-false>)`. > ```css > if(cond1: val1, cond2: val2, fallback) /* only if no value contains commas */ > if(cond1: val1; cond2: val2; fallback) /* general syntax */ > ``` I feel like it would be more readable to just have one condition in `if()`: ```css if(cond1; val1; if(cond2; val2; fallback)) ``` -- GitHub Notification of comment by benface Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10064#issuecomment-2186746054 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 14:41:31 UTC