[csswg-drafts] [css-counter-styles] The entire rule being invalid vs. not defining a counter style when name/descriptors are wrong (#5717)

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

== [css-counter-styles] The entire rule being invalid vs. not defining a counter style when name/descriptors are wrong ==
https://github.com/w3c/csswg-drafts/issues/1682#issuecomment-335868951 resolved that:

> RESOLVED: treat invalid counter styles the way we treat invalid font faces

The [spec change log](https://drafts.csswg.org/css-counter-styles-3/#changes-jun-2015) says:

> @counter-style rules that are invalid due to missing descriptors just fail to create a counter style; they’re otherwise still valid rules.

I understand these resolutions as: if a @counter-style rule has wrong descriptors, it should still be parsed into a valid rule and appear in the OM; it only fails to create a counter style and hence do not affect any counter.

However, the current spec text makes the entire @counter-style rule invalid in some cases:

> If the system is cyclic, the symbols descriptor must contain at least one counter symbol, or else the @counter-style rule is invalid.

> If the system is fixed, the symbols descriptor must contain at least one counter symbol, or else the @counter-style rule is invalid. 

> If the system is symbolic, the symbols descriptor must contain at least one counter symbol, or else the @counter-style rule is invalid.

> If the system is alphabetic, the symbols descriptor must contain at least two counter symbols, or else the @counter-style rule is invalid.

> If the system is numeric, the symbols descriptor must contain at least two counter symbols, or else the @counter-style rule is invalid.

> If the system is additive, the additive-symbols descriptor must contain at least one additive tuple, or else the @counter-style rule is invalid.

> If a @counter-style uses the extends system, it must not contain a symbols or additive-symbols descriptor, or else the @counter-style rule is invalid.

Should they be revised into not defining a counter style?

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


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

Received on Wednesday, 11 November 2020 22:00:19 UTC