Principal Engineer
@ Dell SecureWorks
ViewEncapsulation.None
ViewEncapsulation.ShadowDom
ViewEncapsulation.Emulated
The styles of components with ViewEncapsulation.None are added to the <head> of the document, making them available throughout the application, so are completely global and affect any matching elements within the document.
The styles of components with ViewEncapsulation.ShadowDom are only added to the shadow DOM host, ensuring that they only affect elements within their respective components' views.
The styles of components with ViewEncapsulation.Emulated are added to the <head> of the document, making them available throughout the application, but their selectors only affect elements within their respective components' templates.
Target: Component block itself.
Target: Contents inside component block, based on ancestor provided.