Re: [csswg-drafts] [css-lists] Can replaced elements be list items? (#4633)

Oh, I missed

> An element that does not generate a box (for example, an element with `display` set to `none`, or a pseudo-element with `content` set to `none`) cannot set, reset, or increment a counter.

So I guess an element with `display: list-item` inside a `display: none` may be considered to be a list item but is not able to increment the `list-item` counter.

The section also says

> Whether a replaced element’s descendants (such as HTML option, or SVG rect) can set, reset, or increment a counter is undefined.

but replaced elements themselves are not included, so presumably they must be able to affect counters.

Then Firefox is following the spec. And thinking more about this, I guess that behavior is more reasonable given how the `list-item` counter is supposed to behave (it's so buggy in Chromium, since it's not a real counter). So OK.

GitHub Notification of comment by Loirooriol
Please view or discuss this issue at using your GitHub account

Received on Tuesday, 31 December 2019 00:34:49 UTC