Re: [css-counter-styles] Should using the wrong symbols vs. additive-symbols make an @counter-style rule invalid?

On Mar 26, 2014 12:54 PM, "L. David Baron" <dbaron@dbaron.org> wrote:
>
> http://dev.w3.org/csswg/css-counter-styles/#counter-style-system
> (section 3.1 and its subsections) describes seven counter styles:
>
>  * 5 of them (cyclic, fixed, symbolic, alphabetic, positional) use
>    the 'symbols' descriptor
>
>  * 1 of them (additive) uses the 'additive-symbols' descriptor
>
>  * 1 of them (override) uses neither descriptor
>
> Each subsection of section 3.1 says that a @counter-style rule is
> invalid if it is missing the required descriptor, except of course
> for 'override', where it says:
>   # If a @counter-style uses the override system, it must not
>   # contain a symbols or additive-symbols descriptor, or else the
>   # @counter-style rule is invalid.
>
> Further, the definition of the descriptors themselves in
> http://dev.w3.org/csswg/css-counter-styles/#counter-style-symbols
> (section 3.8) says:
>   # The symbols descriptor must be specified if the counter system
>   # is cyclic, numeric, alphabetic, symbolic, or fixed, and the
>   # additive-symbols descriptor must be specified if the counter
>   # system is additive; otherwise, the @counter-style is invalid and
>   # must be ignored.
>
> This means that failing to have a necessary 'symbols' or
> 'additive-symbols' descriptor makes a @counter-style rule invalid,
> and having an unnecessary 'symbols' or 'additive-symbols' descriptor
> for a rule with 'system: override' makes the @counter-style rule
> invalid.
>
> But nothing I see says that having an unnecessary 'symbols' or
> 'additive-symbols' descriptor for the other six counter styles makes
> the rule invalid (that is, having 'symbols' for 'system: additive'
> or having 'additive-symbols' for one of the 5 systems that require
> 'symbols').  This seems like an odd asymmetry.  Is it intentional,
> should it be fixed, or am I missing relevant spec text?

I think any descriptor should not make a rule invalid because of its
uselessness. Despite symbols and additive-symbols, negative is also useless
in negative-incapable systems. However, restricting all these cases seems
to be meaningless and may sometimes puzzle authors.

Whether unnecessary symbols and additive-symbols in override system make
the rule invalid, in my opinion, is a bit more controversial, because in
this case, they are not only unnecessary, but misleading. Since we in fact
do not allow overriding these two descriptors, it might be better to forbid
them rather than tolerate the misuse of them.

- Xidorn

Received on Wednesday, 26 March 2014 03:29:36 UTC