counter-reset behaving differently to other browsers due to bug 1548753
Categories
(Core :: Layout: Generated Content, Lists, and Counters, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox126 | --- | fixed |
People
(Reporter: fiji, Assigned: emilio)
References
Details
Attachments
(4 files)
Two ordered lists with a counter-reset
on an element between ignore the reset.
During the slack conversation I was discussing a item list with my team. I was referring to item number 7 but it was 4 to them.
I've attached a minimal repro. Setting layout.css.counter-ancestor-scope.enabled
to false
resolves it.
This is a sample message for slack to reproduce it.
1. 1
2. 2
bar
1. 1
2. 2
Reporter | ||
Comment 1•3 months ago
|
||
Reporter | ||
Comment 2•3 months ago
|
||
Assignee | ||
Comment 3•3 months ago
|
||
This is about bug 1548753, which was an intentional change which also had an spec change. But then the spec got reverted, see all the discussion in https://github.com/w3c/csswg-drafts/issues/5477. So this likely needs a bit of spec work to figure out what the right thing should be.
As a workaround, maybe we can just apply this to the list-item counter?
Assignee | ||
Comment 4•3 months ago
|
||
This is not amazing, but this keeps our behavior following the spec for
all counters minus the list-item counter, which needs this for compat,
see bug 1548753.
Updated•3 months ago
|
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cc4b3483c5c1 Apply ancestor-scope-reset to list-item counter only. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45664 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Description
•