回答編集履歴

1

回答を反転

2024/10/17 02:00

投稿

int32_t
int32_t

スコア21559

test CHANGED
@@ -1,7 +1,10 @@
1
- SafariとFirefoxの挙動が正しいと思います。
1
+ SafariとFirefoxの挙動が~~正しい~~間違っていると思います。
2
2
 
3
3
  https://drafts.csswg.org/css-lists/#counter-scope
4
4
  > The scope of a counter therefore starts at the first element in the document that instantiates that counter and includes the element’s descendants and **its following siblings with their descendants**.
5
5
 
6
- Chromeにバグレポートしたほうが良いかと。https://new.crbug.com/
6
+ ~~Chromeにバグレポートしたほうが良いかと。https://new.crbug.com/~~
7
7
 
8
+ https://drafts.csswg.org/css-lists/#inheriting-counters のステップ2により親要素のカウンターセットがコピーされ、ステップ3により同じ名前のカウンターがない場合のみ前の兄弟要素のカウンターセットがコピーされるとあるので、3番目と5番目の`<li>`では親要素の `test` カウンタを参照するのが正しいようです。
9
+
10
+