What is the best way to style a child component when hovering on a parent component, even across component boundaries in Angular 17?
The traditional method of using parent:hover .child in the parent CSS doesn't seem to work on the child component. Is there a more effective approach, considering that :host ng::deep is deprecated?
Is there a way to pass styles from a parent component to a child component when hovering on the parent? Or can an Input be passed to the child component when hovering on the parent?
Thank you for your assistance,
ST
Update - Solution:
The following solution appears to be the most effective for creating local template variables, although some guidelines discourage the use of *ngIf in this manner. Nonetheless, this solution does work!
<div *ngIf="{ active: false } as $" (mouseenter)="$.active = true" (mouseleave)="$.active = false"><app-child [active]="$.active" /></div>