Skip to content

[css-values-4] Clarify property value ranges #9133

Closed
@cdoublev

Description

@cdoublev

Some parts of the definition of property value ranges (eg. <'color'>) seem confusing to me.


Property value ranges, which represent the same pattern of values as a property bearing the same name. [...]

These types do not include CSS-wide keywords such as inherit [...]

CSS-wide keywords are only included in the value definition of a few properties defined in CSS 2 that are not superseded in a later spec.

I suggest this explicit definition:

Property value ranges, which include the set of valid values for a property, excluding CSS-wide keywords and property substitution values.

At least, property substitution values should also be excluded.

Variables defines that var() is valid in any property, and its presence changes the grammar of the property to be valid.

#8823 (comment)


These types do not include [...] any top-level comma-separated-list multiplier (i.e. if a property named pairing is defined as [ <custom-ident> <integer>? ]#, then <'pairing'> is equivalent to [ <custom-ident> <integer>? ], not [ <custom-ident> <integer>? ]#).

If I am not mistaken, this rule targets # in value definitions of coordinating list-valued properties. It targets the repetition of a value that can be declared alone for a property.

For example, to match <'property'> with property defined with <foo> | <bar>, <number> in <foo> can be repeated but not in <bar>:

<foo> = a <number>#
<bar> = <number>#

If I am not mistaken in the example above, this type of grammar definition should obviously be avoided, and I suggest to define this rule with an explicit connection to the concept of coordinating list property group.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions