Is there any way to use css selectors like :first-child, :not(:last-child) inside of the shadow dom?
The example is like this
CustomElement.html
<div id="parent-div>
<slot></slot>
</div>
App.html
<div>
<custom-element>
<div class="heading">Main Heading</div>
<div class="item">item 1</div>
<div class="item">item 1</div>
<div class="item">item 1</div>
<div class="heading">Second Heading</div>
<div class="item">item 1</div>
<div class="item">item 1</div>
<div class="item">item 1</div>
</custom-element>
</div>
what i want to do is find out the first .heading element and add custom styles to it. Since <div class=heading">
is actually a component, i can't add custom styling to it thinking only as the first heading.
P.S.:- I'm using angular-elements, if it helps