w3c / w3c/csswg-drafts

[css-lists] `counter-reset` should be able to compute to `reversed()` without integer

Open
#6,232 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-lists-3
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

See https://drafts.csswg.org/css-lists/#propdef-counter-reset

Computed value: the keyword none or a list, each item an identifier or a reversed() function paired with an integer

I think this should be

Computed value: the keyword none or a list, each item an identifier or a reversed() function optionally paired with an integer

Because if you use counter-reset: inherit and the parent had counter-reset: reversed(c), I guess you want to recalculate the start value in the subscope, instead of inheriting the start value of the parent. Thus the start value shouldn't be part of the computed value.

As https://drafts.csswg.org/css-lists/#instantiating-counters says,

When a counter is instantiated without an initial value, the user agent must dynamically calculate the initial value at layout-time to be the number of elements and pseudo-elements that instantiate the same counter in the same scope, plus 1.

So not at computed-value time but at layout-time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CSS Lists specification's counter-reset definition and the linked “Instantiating counters” section. Check how computed values and layout-time counter initialization interact for inherited reversed() counters. Done means resolving the proposed optional-integer wording and updating the specification consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.