Skip to content
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

problem with counter-reset in nested lists (Firefox only) #75

Open
jowra opened this issue Aug 17, 2023 · 2 comments
Open

problem with counter-reset in nested lists (Firefox only) #75

jowra opened this issue Aug 17, 2023 · 2 comments

Comments

@jowra
Copy link

jowra commented Aug 17, 2023

Firefox has a problem with the numbering of nested ordered lists.

With the reset, the property "counter-reset" in Firefox is not set, so Firefox counts every list item continuously. All other browsers are using the standard: ol {counter-reset: list-item}, but for Firefox this must be explicitly set.

MWE:

list.txt

@techmagus
Copy link

Oh! There's a report here already!

I encountered this as well.

In any case, I filed a bug report over at Firefox:

https://bugzilla.mozilla.org/show_bug.cgi?id=1881517

Hopefully they'll add counter-reset: list-item in their UA stylesheet.

@techmagus
Copy link

techmagus commented Feb 23, 2024

Update.

It's not a Firefox bug per se, Firefox does have counter-reset: list-item in its UA stylesheet. What's happening, as they explained, is that the other browsers are not implementing lists using CSS.

To quote Emilio Cobos Álvarez (https://bugzilla.mozilla.org/show_bug.cgi?id=1881517#c4):

Yeah, this is not really a regression from that change, and this is really invalid. Firefox implements CSS lists using CSS counters as per spec, so you're really resetting https://searchfox.org/mozilla-central/rev/a8cc31504a2379bcf8ba395d2da7bb632b5521d6/layout/style/res/html.css#570.

The issue is that other browsers don't implement html lists using CSS.

The best solution then if using the all property is to also set:

ol { counter-reset: list-item; }

Since the all property reset the counter-reset property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants