W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2019

Re: [csswg-drafts] [css-lists] The implicit list-item counter (#2464)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Mon, 15 Apr 2019 22:12:16 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-483437772-1555366335-sysbot+gh@w3.org>
I don't understand how Chrome's behavior is spec-compliant; I don't see any way to set up counter-increments that would lead to the first item's ::marker getting "1" but its ::after getting "2". Definitely looks like a bug.

I'm not looking at source code, but playing with the example it seems fairly clear that what's happening is the ::marker is still getting its counter value via magic, and the `ol` is defaulting to setting up an *unrelated* `list-item` counter with an erroneous `counter-reset: list-item 1;` declaration. (Check `ol::before{content:counter(list-item);}`; it returns "1".) This is a common mistake when someone isn't super familiar with the counter model; the first increment will apply before the counter is displayed, so you have to set up the counter-reset value accordingly.

@FremyCompany, did you ever file a bug? If not, I can file one.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2464#issuecomment-483437772 using your GitHub account
Received on Monday, 15 April 2019 22:12:18 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:46 UTC