Re: [csswg-drafts] [css-values-5] Should `<whole-value>` functions be parsed before the declaration value range? (#10340)

Unregistered custom properties just tokenize, except for a few things like `var()` and `env()`. So:
 - If `first-valid()` is a normal function, it's accepted, as a token.
 - Otherwise I guess it's invalid.

I don't see any reason to treat it specially, since unregistered custom properties accept almost everything?
I don't think it's likely that people will want `--foo: first-supported(var(b), var(--b))` to behave as `--foo: var(--b)` because `--foo: var(b)` is invalid.
I think it's more likely that people will want to defer the resolution of `first-supported`, e.g.

```css
:root {
  --color: first-supported(color(brand-new-color-space, ...), cyan);
}
.foo { color: var(--color) }
#bar something { color: var(--color) }
```

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


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

Received on Tuesday, 21 May 2024 18:47:28 UTC