Closed Bug 1885842 Opened 3 months ago Closed 2 months ago

counter-reset behaving differently to other browsers due to bug 1548753

Categories

(Core :: Layout: Generated Content, Lists, and Counters, defect, P3)

defect

Tracking

()

RESOLVED FIXED
126 Branch
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
Flags: needinfo?(emilio)

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?

Severity: -- → S3
Flags: needinfo?(emilio)
Priority: -- → P3
See Also: → 1548753
Summary: counter-reset not resetting counter → counter-reset behaving differently to other browsers due to bug 1548753

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.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
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
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: