There are two components to address in your issue.
Selecting the alternate element
To incorporate two distinct elements into your selector (necessary for targeting both the specific element you want and the element with the :hover pseudo-class), you must utilize a combinator.
The methodology will vary based on the connection between the two elements, and sometimes no suitable relationship can be established.
In this scenario, consider utilizing the adjacent sibling combinator.
#element1:hover + #element2 { ... }
Eliminating a property
There are numerous options available for providing different effects when removing a property. It is advisable to compare them in the documentation to identify which best aligns with your requirements.
Be sure to consult the browser compatibility tables, especially since revert-layer
is relatively new and may have limited support.