Closed Bug 1754521 Opened 2 years ago Closed 2 years ago

CSS counter-reset is ignored in Firefox 82 and above

Categories

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

Firefox 96
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: main.coeurl, Unassigned)

Details

Attachments

(1 file)

89.36 KB, image/png
Details
Attached image fx.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

CSS Test: https://codepen.io/arcxor/pen/BamWeGG

CSS counter-reset is ignored in Firefox 82 and above. And not ignored in Firefox 81 and below. The same is true for Windows and macOS.

I was tested on https://live.browserstack.com/dashboard

Actual results:

Behaved as if counter-reset was unspecified.

Expected results:

See attached image.

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: Untriaged → Layout: Generated Content, Lists, and Counters
Product: Firefox → Core

CSS Test2: https://codepen.io/arcxor/pen/ZEaKbjK

If you use counter-set instead of counter-reset, it will behave as expected.

mozregression finds this range. It looks like bug 1548753 introduces this behavior change.

Emilio, do you know if this is an expected behavior change?

Flags: needinfo?(emilio)

Yes, our behavior follows the current spec, afaics.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(emilio)
Resolution: --- → INVALID

Oh, thank you.

I did not understand the latest specification of counter-reset and did not know which behavior was correct. I learned a lot. I will read the specification deeply.

After reading https://github.com/w3c/csswg-drafts/issues/5477, I understood the background as to why this situation arose.

The following URL is a test on the behavior of counter-reset which shows that the latest Firefox is correct and older Firefox and other browsers are incorrect.

In the latest Firefox, numbering with counter-reset is more reasonable. It was my understanding that the previously modified bug 1548753 was also talking about this.

MDN's description of counter-reset https://developer.mozilla.org/en-US/docs/Web/CSS/counter-reset is not appropriate and I will work to have it fixed.

That'd be awesome, thank you!

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

Attachment

General

Creator:
Created:
Updated:
Size: