0

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

pheianox
  • 279
  • 1
  • 11

1 Answers1

2

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

:has(.child:only-child)

isherwood
  • 52,576
  • 15
  • 105
  • 143
Spectric
  • 27,594
  • 6
  • 14
  • 39