W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

[csswg-drafts] [css-counter-styles] Clarify what to do when 'symbols' has only one symbol for 'alphabetic' and 'numeric' systems? (#5698)

From: Xiaocheng Hu via GitHub <sysbot+gh@w3.org>
Date: Thu, 05 Nov 2020 01:47:12 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-736541497-1604540831-sysbot+gh@w3.org>
xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-counter-styles] Clarify what to do when 'symbols' has only one symbol for 'alphabetic' and 'numeric' systems? ==
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"?


@counter-style foo {
  system: alphabetic;
  symbols: 'A' 'B';
  symbols: 'X';

There are two possible way to interpret the spec:

1. This is a parse failure of the declaration, and the previous `symbols` declaration should be used. So we end up using `symbols: '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.

2. The parsing of `symbols` strictly follows the syntax `<symbol>+`, so that we end up using `symbols: '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.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 5 November 2020 01:47:14 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC