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

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