On looking at this again, I'm beginning to think the Firefox behavior here does *not* conform to the spec (as I suggested in comment 3), because counter scope is supposed to be inherited not only from an element's ancestors but also from preceding siblings. The patch in bug 1548753 is titled "prefer an ancestor's counter scope over a sibling's scope", which is exactly what causes the problem here; the sibling's scope is what is wanted, and we're now ignoring it in favor of the ancestor. The discussion of (potentially broken) uses of list markup in bug 1548753 gives the background as to why this was done, but I wonder if we need to reconsider that in some way given the impact it's having here. For a further example, see https://codepen.io/jfkthame/pen/mdmyJdN which is closely based on "Example 22" from [the spec](https://drafts.csswg.org/css-lists/#counter-functions); current Firefox does *not* number the sub-headings under Heading B correctly. Mats, Emilio: any thoughts on how we should proceed here? It seems this is.... complicated.
Bug 1718070 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
On looking at this again, I'm beginning to think the Firefox behavior here does *not* conform to the spec (as I suggested in comment 3), because counter scope is supposed to be [inherited not only from an element's ancestors but also from preceding siblings](https://drafts.csswg.org/css-lists/#inheriting-counters). The patch in bug 1548753 is titled "prefer an ancestor's counter scope over a sibling's scope", which is exactly what causes the problem here; the sibling's scope is what is wanted, and we're now ignoring it in favor of the ancestor. The discussion of (potentially broken) uses of list markup in bug 1548753 gives the background as to why this was done, but I wonder if we need to reconsider that in some way given the impact it's having here. For a further example, see https://codepen.io/jfkthame/pen/mdmyJdN which is closely based on "Example 22" from [the spec](https://drafts.csswg.org/css-lists/#counter-functions); current Firefox does *not* number the sub-headings under Heading B correctly. Mats, Emilio: any thoughts on how we should proceed here? It seems this is.... complicated.