I have this custom element:
<my-custom-form>
#shadow-root
<style>
:host label {
color: red;
}
</style>
<div id="wrapper">
<slot name="form-label"></slot>
...
</div>
</my-custom-form>
Now I use it as follows:
<my-custom-form>
<label slot="form-label">Some Label</label>
</my-custom-form>
I expected that the label
should be styled as red color. But it isn't.
Isn't <label>
element residing in the light DOM as a direct child of :host?