[csswg-drafts] [css-values-5] we should ensure an if with no fallback can be reasoned about later (#10956)

keithamus has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values-5] we should ensure an if with no fallback can be reasoned about later ==
If the if conditionals (https://github.com/w3c/csswg-drafts/issues/10064) have an open question as to whether a condition without a valid fallback should be empty token stream or IACTV. I believe we should consider how these can compose and how user can reason about whether or not the condition resolved to one-or-the-other where possible. Some contrives examples:


```css
--my-hue: if(style(max-width: 400px): 300)
background: oklch(70% 0.1 var(--my-hue, 0)) // This should fallback to zero
```

```css
--my-lch: if(style(max-width: 400px): 300)
--my-keyword: if(style(max-width: 500px): red)

background: if(
  var(--my-keyword): var(--my-keyword) //
  else: oklch(70% 0.1 var(--my-hue, 0)
); // This should be `red` or `oklch`
```

I'm unsure if IACTV vs empty token stream precludes conditions such as these but I think if they do that should be a deciding factor,

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10956 using your GitHub account


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

Received on Thursday, 26 September 2024 17:29:31 UTC