Skip to content

[css-properties-values-api] Allow <syntax> production in syntax descriptor #11426

@andruud

Description

@andruud

You currently need to specify the custom property type as a string, e.g. syntax: "<length> | auto", but now that <syntax> exists, it would be nice to just do syntax: <length> | auto.

We'd still allow string-wrapped types for legacy reasons, making the grammar syntax: <syntax> | <string>.

Note that <syntax> is wrapped in type() in some other cases:

  • In attr(), the <syntax> part must always be wrapped in type().
  • In @function, the <syntax> part may appear unwrapped when it's a single <syntax-component>, otherwise it must be wrapped in type().

However, I think such a wrapper would be redundant for the syntax descriptor (e.g. syntax: type(<length> | auto);), so I suggest that we just stick to the bare/unwrapped <syntax>.

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