Skip to content

[css-values-5] <any-value> in functional <general-enclosed> should be a non-strict comma-containing production #11042

@cdoublev

Description

@cdoublev

About comma-containing productions in functional notations:

If it does not start with a "{" token, then it cannot contain commas or {} blocks

There is an exception for var(..., <declaration-value>) by defining <declaration-value> as a non-strict comma-containing production, but not for <functional-token> <any-value> ):

For example, this is valid today but not when applying the new rules for comma-containing productions:

  • @media unknown(foo, bar) {}
  • @media unknown({ foo }, bar) {}
  • :is(foo, bar)
  • :is({ foo }, bar)

Note: :is() is consumed as a function but it may be considered as a selector instead (as in Bikeshed).

Even if they were defined as non-strict, { foo }, bar would be invalid:

[A non-strict comma-containing production] still follows the standard comma-containing production rules when it does start with a "{" token [...]

These standard comma-containing production rules prevent matching further than { foo }:

If it does start with a "{" token, then the production matches just the {} block

Breaking backward-compatibility may be ok. I dunno. Otherwise the "general functional notation" argument may need to be excluded from the comma-containing production rules.

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