I want the color of 'h1' tag to change when the mouse hovers over the 'li' tag. I tried following the answer provided here: CSS :: child set to change color on parent hover, but changes also when hovered itself but that hasn't worked for me.
li{
width: 100vw;
}
li:hover{
background-color: orange;
}
li:hover h1:not(:hover){
color: white;
}
<ul>
<li><h1>Home</h1></li>
</ul>