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

> So if you have X and you want to add Y when A < B && B >= C || D != E with those three functions one way to write it would be

````
calc(X + lesser(A, B, greater(C, B, equal(D, E, 0, Y), Y), 0)) 
````

Is that an example from a realistic use case or just a strawman?

Actually, another possibility would be ternary operators inside `calc()`:

````
calc(X + (A < B && B >= C || D != E) ? Y : 0) 

calc(X + (and(A < B, or(B >= C, D != E))) ? Y : 0)
````

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

Received on Wednesday, 5 February 2020 06:07:38 UTC