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

@jimmyfrasche 

> If the semantics are first true condition wins (which is the easiest to implement and understand, especially) and else is defined to always match then it's valid everywhere but probably only means what you want when it's at the end. This allows some printf debugging by sticking an else in the middle, and it's easy enough for linters to detect and warn about a medial else.

This has the same issue as many other proposed separators, now `else:` is invalid in other properties (including custom properties).

But yes, +1 for the "first true wins".

----

@tabatkins 

> Empty token stream can be accomplished by just omitting the value part, so I don't think it needs to be specially addressed.

I don't understand what you mean. Omit what, how? Can you write an example?

----

@martinthomson 

> Good to see progress. 🚲🏚️ Given the extended syntax, is this an "if()" or a "match()"?

It’s still a conditional, so still `if()`. `match()` would be incredibly confusing.

----

Agreed with @Loirooriol wrt keywords, but also this is one of these few cases where conciseness is extremely important because this will be used all over the place. So can we please stop suggesting lengthy function names and separators?

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


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

Received on Wednesday, 26 June 2024 16:16:46 UTC