I am looking for a way to change the appearance of an element when its container is hovered over using CSS or SCSS.
Here are my requirements: - The solution must be implemented within the child component or the sass file, without knowledge of parent-child relationships. - Can use either SCSS, CSS, or Angular component code.
I have already experimented with the host listener decorator in Angular, but it only targets the host element itself, not its parent.
I also tried using the :host and :host-context selectors, but ran into similar issues as with host listener.
Any suggestions on how to achieve this would be greatly appreciated.
EDIT: To better illustrate what I'm trying to accomplish, imagine a small square inside a larger square. When hovering over the area outside the small square but still inside the large square, the small square should change style.
CLARIFICATION: