I'm trying to target an inner element with Sass using the :hover selector, but for some reason when using the partial selector with the underscore, the property gets ignored. The only workaround is to type the entire class name:
HTML:
<div class="cds__grid">
<div class="cds__card">
<img src="images/content/image.svg">
<div class="cds__card-overlay">
<h4>A Title</h4>
<p>Some Text</p>
</div>
</div>
</div>
SCSS:
.cds{
&__grid{
//Some Properties
}
&__card{
&-overlay{
background-color: grey;
}
&:hover{
//Ignored
&-overlay{
background-color: blue;
}
//Applied on Hover
.cds__card-overlay{
background-color: blue;
}
}
}
}