Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cdoublev opened this issue Mar 11, 2025 · 0 comments
Open
Labels

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Mar 11, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant