csswg-drafts
csswg-drafts copied to clipboard
[css-values-5] `<any-value>` in functional `<general-enclosed>` should be a non-strict comma-containing production
About comma-containing productions:
If it does not start with a "{" token, then it cannot contain commas or {} blocks
@media unknown(foo, bar) {}
and @media unknown({}) {}
are valid today. So I think <any-value>
in the functional <general-enclosed>
should be defined as a non-strict comma-containing production.
I guess the above restriction should only apply in functions (which is unclear), so there is no need to define <any-value>
in the <general-enclosed>
block to allow @media (foo, bar) {}
and @media ({})
to be parsed as valid rules, as well as :unknown-pseudo(foo, bar)
and :unknown-pseudo({})
as <pseudo-class-selector>
s.
(edit)
I missed that non-strict containing production should still follow the syntax rules when it actually starts with a {}
-block, so I think <any-value>
in functional <general-enclosed>
should be something different. Perhaps the spec should just say that the rules should only apply in declaration values.