0

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

pheianox
  • 197
  • 9

1 Answers1

2

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

:has(.child:only-child)

isherwood
  • 46,000
  • 15
  • 100
  • 132
Spectric
  • 5,761
  • 2
  • 6
  • 27