Select all siblings of a given element.
In this example, if a card is being hovered, we change the style of all card elements that are not being hovered.
.cards:has(.card:hover) .card:not(:hover) {
opacity: 0.2;
}
Select all siblings of a given element.
In this example, if a card is being hovered, we change the style of all card elements that are not being hovered.
.cards:has(.card:hover) .card:not(:hover) {
opacity: 0.2;
}