How to target element if its first child has specific class

  Kiến thức lập trình

I want to add specific class to my div element but only if its first child is a div with class hide-list-item. The following does not work because it hides div if any child has hide-list-item:

[&:has(div.hide-list-item)]:hidden

LEAVE A COMMENT