W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2021

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

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Thu, 13 May 2021 22:13:28 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-840865604-1620944007-sysbot+gh@w3.org>
It may make sense to make a lone 0-weight entry invalid. But not in general, I think it's reasonable to be able to specify a custom symbol for zero in:

```css
<style>
@counter-style dice {
  system: additive;
  additive-symbols: 6 ⚅, 5 ⚄, 4 ⚃, 3 ⚂, 2 ⚁, 1 ⚀, 0 ∅;
  suffix: " ";
  range: infinite infinite;
}
</style>
<ol start="-12" style="list-style: dice"></ol>
<script>
for (let i = -12; i <= 12; ++i)
  document.querySelector("ol").append(document.createElement("li"));
</script>
```

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 13 May 2021 22:13:30 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:33 UTC