- From: Guillaume via GitHub <sysbot+gh@w3.org>
- Date: Sat, 28 Oct 2023 05:03:51 +0000
- To: public-css-archive@w3.org
> No, I think if a spec said `[=CSS/parse=] |foo| as <'background-image'>`, we'd want to assume it's referring to the single iteration, and not a CSS-wide keyword, etc.
So CSS wide-keywords are explicitly excluded from property value ranges...
> These types do not include CSS-wide keywords such as `inherit`.
... whereas substitution values ("etc") are not, which may be confusing. It seems that this difference only exists because `inherit` is explicitly in CSS2 property value definitions.
---
> If something did want to parse an entire property, they could phrase it as `[=CSS/parse=] as the 'background-image' property` or something.
You have gotten to the heart of the matter so I hope there is no need for an example.
How would you represent the "entire `property` grammar" using the CSS value definition syntax, if you cannot use `<'property'>`?
You may create an object that `[=CSS/parse=]` would not need to parse the grammar using the CSS value definition syntax:
```js
const grammar = {
name: 'background-image',
type: 'property',
value: '<bg-image>#',
}
```
The result from parsing `<'background-image'>` would just need to get a different `type` than `property`.
But it seems inappropriate to me that `<'background-image'>` do not accept the "entire `background-image` grammar", so I use context to make the decision to allow it.
--
GitHub Notification of comment by cdoublev
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9133#issuecomment-1783703461 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 28 October 2023 05:03:52 UTC