Re: [csswg-drafts] [css-values-4] Allow `inherit` in `calc()` (and friends), `color-mix()`, RCS (#9757)

@LeaVerou using the example from the PR brief:

```css
:root {
  --depth: 1;
  * {
    --depth: calc(first-supported(inherit, 0) + 1);
  }
}
```

…would be equivalent to this:

```css
:root {
  --depth: 1;
  * {
    --depth: calc(inherit(--depth, 0) + 1);
  }
}
```

provided this stipulation I mentioned is possible/accurate:
>We would need to make sure that inherit is seen as an invalid value when used inline in this context so that first-supported() falls back to the next value(s).

That way, when `--depth` is not set, `first-supported()` would have nothing to inherit from the `inherit` value and thereby fall back to the next value provided, in this case— `0`.

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


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

Received on Sunday, 31 December 2023 17:58:25 UTC