The attached test case does not render properly. To see the bug, counters need to be implemented (http://bugzilla.opendarwin.org/show_bug.cgi?id=4980), but I have not yet committed that patch, so this bug is not yet present in the nightlies. I am filing it anyway in anticipation.
Created attachment 10772 [details] Test case
There are a few other "scope" test cases at http://dbaron.org/css2.1/tests/imported-20050702/ Looks like they may all have the same root problem.
The reported test case is properly rendered in WebKit r39524.
I am not able to reproduce this bug in Safari 15.5 on macOS 12.4 based on attached text case, which is changed to following JSFiddle since it was opening as TXT: Link - https://jsfiddle.net/cf84ryst/show It is matching with other browsers like Chrome Canary 105 and Firefox Nightly 103. While based on Comment 02, following test cases are broken: --> Broken in Safari, Firefox and Chrome (matching with each other but not with expected results): https://dbaron.org/css2.1/tests/imported-20050702/t1202-counter-04-b.xht https://dbaron.org/css2.1/tests/imported-20050702/t1202-counter-10-b.xht https://dbaron.org/css2.1/tests/imported-20050702/t1202-counters-04-b.xht https://dbaron.org/css2.1/tests/imported-20050702/t1202-counters-10-b.xht --> Broken in Safari and Firefox (matching with each other but not with expected results): https://dbaron.org/css2.1/tests/imported-20050702/t1204-reset-00-c-o.xht Thanks!
I think the failure on https://dbaron.org/css2.1/tests/imported-20050702/t1204-reset-00-c-o.xht is a legitimate bug so let's keep it open. Thanks for testing!
<rdar://problem/95631561>