[csswg-drafts] [css-values] Introduce Exceptions to Productions in Value Definition Syntax (#13393)

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

== [css-values] Introduce Exceptions to Productions in Value Definition Syntax ==
In [Component Value Types](<https://drafts.csswg.org/css-values/#component-types>), _numeric data types_ (2.) already allow for a [bracketed range restriction](https://drafts.csswg.org/css-values-4/#numeric-ranges) to limit valid values, e.g. `<angle [0,180deg]>` with *minimum* and *maximum*. 
I propose that a similar notation is introduced for _other non-terminals_ (5.), so that editors can provide *exceptions* within the grammar, not just in prose. This usually affects idents used as keywords.

For instance, [`<custom-ident>`](https://drafts.csswg.org/css-values/#custom-idents) itself could be described more exactly as `<ident [initial, inherit, unset, default, revert, revert-layer, revert-rule]>` to formally exclude all currently drafted [CSS-wide keywords](https://drafts.csswg.org/css-cascade-5/#defaulting-keywords), and uses of this production could likewise limit it further as needed, e.g. `<custom-ident [none]>`.

I'm not sure whether more complex types should be allowed as exceptions although that could make some expressions more readable, e.g. `<family-name> = <string> | <custom-ident [<generic-complete>, <generic-incomplete>]>+`.

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


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

Received on Sunday, 25 January 2026 14:50:26 UTC