0

Is it possible to change the background of a div that has only one child, for instance ?

1 Answers1

3

You might consider using this once support for has has been added.

:has(.child:only-child)

isherwood
  • 58,414
  • 16
  • 114
  • 157
Spectric
  • 30,714
  • 6
  • 20
  • 43