Re: [csswg-drafts] [css-pseudo][css-lists] Allow counter-* in ::marker (#5265)

I just wanted something like

```css
ol {
  counter-reset: my-counter;
}
::marker {
  counter-increment: my-counter;
  content: "[" counter(my-counter) "]";
}
```

Sure, I can set `counter-increment: my-counter` on the `li`, but then I need another rule :)

Or I could forget about `my-counter` and just use `counter(list-item)`. However, `list-item` is not an actual counter in Chromium, so it has some bugs. For example, until recently, it used to be one unit greater than the correct value... https://crbug.com/796961

So it's not a big deal, but it seems unexpected to me that, given ::marker can read counter values, it can't change them. And changing counters seems completely independent of the outside layout model.

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

Received on Wednesday, 8 July 2020 23:43:25 UTC