Re: [csswg-drafts] [css-lists] CSS counter scope/inheritance is incompatible with HTML ordinals (#5477)

@Loirooriol [That's intentional](https://searchfox.org/mozilla-central/rev/44e39a47b27313029460bada366c67ebe6d7c57e/layout/base/nsCounterManager.cpp#149-152,158). We only prefer the ancestor's scope when it is an explicit `counter-reset` scope, not an implicit scope created from `counter-set/increment` as in your example (the outer `<list>` only has a `counter-set`, not `counter-reset`).  The reason is that it's the minimal change for making CSS counters compatible with HTML ordinals.

I guess we could include implicit scopes too for consistency perhaps, but that also risks breaking existing content that depends on that behavior. But yeah, it looks like the spec currently doesn't make that distinction, so I guess it's technically a bug in Gecko.  But the intent of our proposal was to only include explicit `counter-reset` scopes, since that was the minimal required change for HTML lists.

I don't feel strongly either way, but I haven't looked at the details of the fallout that change would create... (I can look into that after I'm back from my vacation in case people want to go that route - filed [a bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1718683) for now).

-- 
GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5477#issuecomment-870892870 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 29 June 2021 20:27:04 UTC