In replace an if() function step 1.1 we have this:
- Substitute arbitrary substitution functions in the first
<declaration-value> of branch, then parse the result as an <if-condition>. If parsing returns failure, continue; otherwise, let the result be condition.
This suggests that a condition like if(style(--x) and invalid: a; else: b) should:
- Substitute
--x
- Try and fail to parse the resulting
something and invalid clause as an <if-condition>
- Continue onto the
else branch
- Return
b
However, a few subtests of https://wpt.live/css/css-values/if-conditionals.html expect this to instead render the entire if() IACVT:
if(style(--x) and invalid: true_value; else: false_value)
if(invalid or style(--x): true_value; else: false_value)
if(style(not (--x: 5) or (--z: 10px)): true_value; else: false_value)
(These are subtests 191, 192, and 193.)
In replace an if() function step 1.1 we have this:
This suggests that a condition like
if(style(--x) and invalid: a; else: b)should:--xsomething and invalidclause as an<if-condition>elsebranchbHowever, a few subtests of https://wpt.live/css/css-values/if-conditionals.html expect this to instead render the entire
if()IACVT:(These are subtests 191, 192, and 193.)