Closed Bug 1696201 Opened 3 years ago Closed 3 years ago

List numbering fails to ignore nested lists

Categories

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

defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox-esr78 --- wontfix
firefox86 --- wontfix
firefox87 --- wontfix
firefox88 --- wontfix

People

(Reporter: brille1, Unassigned)

References

Details

Attachments

(4 files)

Attached image List numbering error.png (deleted) —

List numbering seems to cross-reference nested lists:

http://www.axeldahmen.de/Office/blog/en/msoft/ASP.NET-Core--Nothing-But-Chaos.html

As you can see from the screenshot, the heading (<h1>) doesn't continue the previous heading, but instead continues the nested ordered list.

Google Chrome MS Edge recognize the nesting correctly.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Generated Content, Lists, and Counters' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: General → Layout: Generated Content, Lists, and Counters
Product: Firefox → Core

Adding something like counter-reset: list-item to the root fixes it, which is a bit odd...

Status: UNCONFIRMED → NEW
Ever confirmed: true

Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=5dc0652cd024fef30217ac3e6087b7a32f16967f&tochange=9bad25ccc8d0414e21d3c8d4dcf2178a97bb07c3

So, This is not a regression. The bug appear since Bug 1518201 landed.

Before Bug 1518201, "0." for all headings (<h1>).
After Bug 1518201, "A." and "C."

Blocks: 1518201
Has Regression Range: --- → irrelevant
Has STR: --- → yes
Attached file Testcase #2 (deleted) —

This is exactly the same as the first testcase, but with this addition:

::marker { content: counters(list-item, ".") }

That should obviously not make a difference to the numbering and it doesn't in Firefox, but it does in Chrome - they now agree with us on the numbering.

Attached file Testcase #3 (deleted) —

... and here's the same test using a foo counter instead of list-item. Again, it should have the same ordinals as the previous tests, and it does in both Firefox and Chrome.

We're implementing the spec correctly and Chrome is not. They apparently don't use the built-in list-item CSS counter for HTML lists (as required by spec), or they do but have added special non-compliant rules for it.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID

As noted by @emilio above, here's a workaround to avoid relying on Chrome bugs for this document:

:root { counter-reset: list-item; }

Marvellous!

Thank you @mats, for taking the time.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: