-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-lists] The implicit list-item counter #2464
Comments
There is a spec for this |
I don't like how these counters work in Chrome, it's not useful. I also have the impression from glancing at the spec that Chrome is probably spec-compliant however, though today is definitely not the day I'll shine by my spec reading skills (evidence provided in post number one). Could we change the spec so we get Edge behavior where using the counter provides you with the correct value? Or does the spec already make Edge's behavior correct and Chrome is off by one? |
Yeah, Chrome behavior is definitely weird. Maybe I should file a bug on them. |
@FremyCompany Spec for this is currently here https://drafts.csswg.org/css-lists-3/#list-item-counter Is there anything there you think needs to be fixed or expanded on? |
@fantasai I think Chrome behavior in this test case is incorrect, and it's probably a bug of Chrome not a bug of the spec; I don't think the spec needs changes. Maybe someone more familiar than me should take a look at the spec, and verify if the |
@FremyCompany ... The testcase just has the one CSS rule? Yeah, I can't see any reason why it should be 1. A2. |
Looks like it's filed as https://bugs.chromium.org/p/chromium/issues/detail?id=796961 Flagging for WPT, remove tag if the testcase is actually checked in already. :) |
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 @FremyCompany, did you ever file a bug? If not, I can file one. |
Whoops, this tab had been open for a while, so I didn't see the more recent comments. All cool then, never mind @FremyCompany |
It looks like both IE/Edge and Chrome/Safari use a counter named "list-item" to keep track of the current counter. Unfortunately, there is no interop on which value the counter has (I think Edge returns the correct value here).
Is there any desire to standardize that, or should we just keep this an undocumented feature? ============> cc @kojiishi @dbaron
The text was updated successfully, but these errors were encountered: