Made panel-variant apply styles only to first child

Fixex #9482