[csswg-drafts] [css-counter-style-3] Clarify attribute values that change the algorithm (#11903)

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

== [css-counter-style-3] Clarify attribute values that change the algorithm ==
For the setter of descriptors defined as attributes on [`CSSCounterStyleRule`](https://drafts.csswg.org/css-counter-styles-3/#csscounterstylerule), the spec says:

  > 3. If the attribute being set is `system`, and the new value would change the algorithm used, do nothing and abort these steps. It’s okay to change an aspect of the algorithm, like the first symbol value of a fixed system.

From the behavior observed in Chrome, it can be set when:

  1. the current system is omitted and the specified system is `symbolic` (default value)
  2. the current and specified systems are `fixed` or `extends` a predefined counter style

It may be usefull to clarify (2) because it is not clear why the algorithm does not change.

Besides, still based on the behavior observed in Chrome, this is unspecified:

  - `symbols` can be set only if the system neither is `additive` or `extends` a predefined counter style
  - `additiveSymbols` can only be set if the system is `additive`

With `rule` representing `@counter-style name {}`, authors cannot set `rule.additiveSymbols = 'a'`, whereas `@counter-style name { additive-symbols: a }` is a valid rule (not defining a counter style). In both cases, the system is `symbolic` (default value) but `symbols` does not have at least one symbol.

Now I do not think this is a problem, but it might be useful to also add these restrictions.

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


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

Received on Tuesday, 11 March 2025 05:48:50 UTC