:has()

Parent Selector

div.parent:has(#unique-descendent) {
  background: pink;
}

Sibling Selector

hover over element to select all siblings after itself in the document flow

.parent li:nth-child(5n):hover, .parent li:nth-child(5n):hover ~ li:nth-child(5n) 

Previous Sibling Selector

hover over element to select all previous siblings

.parent li:nth-child(5n):hover, .parent li:nth-child(5n):has(~ li:nth-child(5n):hover)

commit: add previous sibling selector support with css :has() · picaq/picaq.github.io@be1657d

demo: picaq.github.io/sarasa/#human-language-support