Re: [csswg-drafts] [css-values] Grammar syntax for defining excluded idents for <custom-ident> productions (#11924)

The CSS Working Group just discussed `[css-values] Grammar syntax for defining excluded idents for <custom-ident> productions`, and agreed to the following:

* `RESOLVED: we add a new ! brackets group to the custom-ident terminal to add keywords which are excluded from production`
* `RESOLVED: Adopt <'property'> = <custom-ident ![ none | foo | bar | <non-terminal> | something-long ]>`

<details><summary>The full IRC log of that discussion</summary>
&lt;ydaniv> TabAtkins: this one is about how custom-ident does not match<br>
&lt;ydaniv> ... Sam wanted to make it explicit in the grammar<br>
&lt;TabAtkins> &lt;'property'> = &lt;custom-ident> - [ none | foo | bar | baz | something-long ]<br>
&lt;romain> +1<br>
&lt;ydaniv> ... there are a lot of proposals for syntax, I slightly prefer a - combinator<br>
&lt;ydaniv> ... you must have a custom-ident on the left, and on the right the keyword<br>
&lt;TabAtkins> &lt;'property'> = &lt;custom-ident -[ none | foo | bar | baz | something-long ]><br>
&lt;ydaniv> ... other suggestions are to put it directly into the custom-ident<br>
&lt;ydaniv> ... ok with any proposal if anyone has strong opinion<br>
&lt;fantasai> &lt;'property'> = &lt;custom-ident ![ none | foo | bar | baz | something-long ]><br>
&lt;fantasai> was also proposed<br>
&lt;astearns> ack fantasai<br>
&lt;ydaniv> fantasai: unless we want to make this a general combinator, ...<br>
&lt;ydaniv> ... we should keep it inside the brackets<br>
&lt;ydaniv> ... otherwise it would be the [missed] operator<br>
&lt;astearns> s/[missed]/tightest<br>
&lt;TabAtkins> s/\[missed\]/tightest/<br>
&lt;ydaniv> ... between the 2 things I posted, if it's a combinator I prefer the -<br>
&lt;ydaniv> fantasai: the brackets serve as a grouping operator<br>
&lt;kizu> q+<br>
&lt;astearns> ack kizu<br>
&lt;fantasai> s/prefer the -, and if it's incorporated, I prefer the !. - reads like a dash, which we use for other purposes/<br>
&lt;ydaniv> kizu: off topic a bit, but nice to have for @property to use this there as well<br>
&lt;astearns> s/prefer the -/prefer the !/<br>
&lt;ydaniv> TabAtkins: after we resolve please open an issue on that<br>
&lt;ydaniv> kizu: sure<br>
&lt;weinig> q+<br>
&lt;fantasai> s/prefer the !/prefer the -, and if it's incorporated, I prefer the !. - reads like a dash, which we use for other purposes/<br>
&lt;astearns> ack weinig<br>
&lt;fantasai> s/prefer the -/prefer the - because it feels more like a combinator/<br>
&lt;romain> slight preference for &lt;custom-ident ![ none | foo | bar | baz | something-long ]><br>
&lt;ydaniv> weinig: fine with anything, I think for those who wanted to do more, would be good to aggregate what's not specified by the grammar and add that as well<br>
&lt;ydaniv> ... but interested in how we can get this done better<br>
&lt;dbaron> I somewhat like weinig's original suggestion of excludes=<br>
&lt;ydaniv> astearns: sounds like we're converging around using !<br>
&lt;ydaniv> dbaron: not a strong opinion but I kind of like the original suggestion of excludes but could be too verbose<br>
&lt;ydaniv> TabAtkins: don't mind, all reasonable<br>
&lt;ydaniv> fantasai: we don't really use a keyword exclusion operator<br>
&lt;TabAtkins> current modifiers are just: a plain `[...]` bracket, for ranges, and now would add `![...]` bracket for exclusions<br>
&lt;ydaniv> astearns: as spec production would be nice to have, a readable keywords seems ok to me<br>
&lt;TabAtkins> Notably CSS is the rare language where ! does *not* meant "not" lol<br>
&lt;ydaniv> fantasai: this would be the first place where we have a syntactic operator, and not need to go in that direction<br>
&lt;ydaniv> TabAtkins: leaning towards what fantasai said<br>
&lt;fantasai> s/we have/we'd have an identifier as/<br>
&lt;ydaniv> astearns: dbaron you want to argue more for the keyword?<br>
&lt;ydaniv> dbaron: ok with !<br>
&lt;fantasai> PROPOSED: &lt;'property'> = &lt;custom-ident ![ none | foo | bar | baz | something-long ]><br>
&lt;ydaniv> PROPOSED RESOLUTION: we add a new ! brackets group to the custom-ident terminal to add keywords which are excluded from production<br>
&lt;ydaniv> astearns: objections?<br>
&lt;ydaniv> RESOLVED: we add a new ! brackets group to the custom-ident terminal to add keywords which are excluded from production<br>
&lt;fantasai> RESOLVED: Adopt &lt;'property'> = &lt;custom-ident ![ none | foo | bar | &lt;non-terminal> | something-long ]><br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11924#issuecomment-4040111909 using your GitHub account


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

Received on Wednesday, 11 March 2026 15:38:53 UTC