Background: I have 2 different components constructed in Angular, both video cards. They are both being styled from the same stylesheet using scss. There is a logic as to why there are 2 separate components that perform similar functions, but I haven't explained that as that is not the question
Component One's structure:
<div class="container">
<h4 class="title">Title</h4>
<img class="image" src="..."/>
</div>
Component Two's structure:
<div class="container">
<div class="parent">
<h4 class="title">Title</h4>
<img class="image" src="..."/>
</div>
</div>
Problem Styles applied to .container>img are showing up on .container>parent>img, and likewise for .container>h4
Objective Style .container>img/h4 and .container>.parent>img/h4 separately such that styles from one do not affect the other
I would not like to use the :has pseudo-class as that is not fully supported. Thank you all for your help