fix(platform-browser): allow to mix shadow dom with non shadow dom
Allow to style components that don’t use shadow dom inside of components that do.
This reverts 53cf2ec573
and adds a test for this case.
Related to #7887
This commit is contained in:
@ -126,6 +126,7 @@ export class DomRenderer implements Renderer {
|
||||
let nodesParent: Element|DocumentFragment;
|
||||
if (this.componentProto.encapsulation === ViewEncapsulation.Native) {
|
||||
nodesParent = (hostElement as any).createShadowRoot();
|
||||
this._rootRenderer.sharedStylesHost.addHost(nodesParent);
|
||||
for (let i = 0; i < this._styles.length; i++) {
|
||||
const styleEl = document.createElement('style');
|
||||
styleEl.textContent = this._styles[i];
|
||||
|
Reference in New Issue
Block a user