[csswg-drafts] [css-lists] Imitted start value of reversed list isn't calculated right (#6233)

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

== [css-lists] Imitted start value of reversed list isn't calculated right ==
From https://drafts.csswg.org/css-lists/#instantiating-counters,

> 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.

Imagine a simple

```html
<ol reversed>
  <li>foo</li>
  <li>bar</li>
  <li>baz</li>
</ol>
```
There is a singe element instantiating `list-item`: the `<ol>`. The `<li>` don't instantiate it since they only use [`counter-increment`](https://drafts.csswg.org/css-lists/#increment-set)

> The counter-increment and counter-set properties manipulate the value of existing counters. They only instantiate new counters if there is no counter of the given name on the element yet.

But precisely, what we want to count is the number of `<li>`. Or maybe the (negated?) sum of their `counter-increments` if they have been set to a value different than 1 (-1?). Something like that, not the number of instantiations.

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


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

Received on Wednesday, 21 April 2021 15:33:38 UTC