Re: [csswg-drafts] [css-counter-styles] Additive algorithm shouldn't divide by 0 (#5784)

Thanks, mostly it looks good, but the final assertion may not hold:

```html
<style>
@counter-style foo {
  system: additive;
  additive-symbols: 1 ⚀;
}
</style>
<li value="0" style="list-style: foo inside"></li>
```
> 1. Let value initially be the counter value

It's 0.

> 2. If value is 0, and there is an additive tuple with a weight of 0, append that tuple’s counter symbol to S and return S.

The condition is false because there is no tuple with a weight of 0. So we start the loop

> 3.2. If weight is zero, or weight is greater than value, continue.

`weight = 1 > 0 = value`, so we continue. But there is no other tuple, so we exit the loop.

> 4. Assertion: value is still non-zero.

Assert failed, the value is zero.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5784#issuecomment-841434323 using your GitHub account


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

Received on Friday, 14 May 2021 18:48:30 UTC