Q: Adding class to custom element to override style Im trying to change the style of an external label of a custom element. The classname is attached correctly but style is not defined.
The custom element is created on stencil and react.


  elementRef: ElementRef;

  constructor(@Inject(ElementRef) elementRef: ElementRef) {
    this.elementRef = elementRef;
  }

  ngAfterViewInit(): void {
      const parentElement = document
      .querySelector('.mobilePhone')
      .shadowRoot.querySelector('label');
    parentElement.className = 'newClassName';
  }
<custom-form-element class="mobilePhone" >

<label></label>

</custom-form-element>




A: parentElement.setAttribute('style', 'color:green');

