Description
The current spec says:
The @counter-style rule must have a valid symbols descriptor...; otherwise, the @counter-style does not define a counter style (but is still a valid at-rule).
Some counter systems specify that the symbols descriptor must have at least two entries. If the counter style’s system is such, and the symbols descriptor has only a single entry, the descriptor is invalid and must be ignored.
What exactly does "the descriptor is invalid and must be ignored mean"?
Example:
@counter-style foo {
system: alphabetic;
symbols: 'A' 'B';
symbols: 'X';
}
There are two possible way to interpret the spec:
-
This is a parse failure of the declaration, and the previous
symbols
declaration should be used. So we end up usingsymbols: 'A' 'B'
. This is difficult to implement, though, as the parsing of one descriptor will depend on another descriptor. I'm not sure if anywhere else in CSS has such behavior. -
The parsing of
symbols
strictly follows the syntax<symbol>+
, so that we end up usingsymbols: 'X'
. It has one symbol, and therefore the @counter-style does not define a counter style. This is Firefox's current behavior
I suggest we revise the spec and clarify that we follow the second behavior, because it's the only implemented behavior, and it's easier to implement.