Skip to content

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

@cdoublev

Description

@cdoublev

For the setter of descriptors defined as attributes on CSSCounterStyleRule, the spec says:

  1. 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 = '1 a', whereas @counter-style name { additive-symbols: 1 a } is a valid rule (not defining a counter style). In both cases, the system is symbolic (default value) but symbols (is not declared and) 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions