:has()を使って親要素内に存在する子要素を数えるCSSのサンプル | かちびと.net
Result See the Pen Counting child items with :has() by kachibito (@kachibito) on CodePen. かなり世間から遅れていて今...