Re: [csswg-drafts] [css-values] Iverson bracket functions (#4731)

Does `if(if(A > B, C > D, E > F), 10px, 20px)` mean that the logical and comparative operators need to be added to calc expressions and that `if()` is essentially a handy way of converting boolean-typed calc expressions into non-bools? Otherwise, it would need to be written `if(if(A > B, if(C > D, true, false), if(E > F, true, false)), 10px, 20px)` (or `if(E > F, true)` if `false` is the zero value of bool).

Does `if(p)` then only accept bool for p? Do you need to write `if(var(--v) != 0)`?

If bool is added, there are a lot of attributes that are either "true"/"false" or have bool-ish definitions and it would be handy to be able to do things like `if(attr(aria-pressed bool))`.


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

Received on Thursday, 6 February 2020 02:22:18 UTC