Shadow DOM

View Encapsulation in Angular

View Encapsulation in Angular defines how the styles defined in the template affects the other parts of the application. The angular uses three strategies, while rendering the view ViewEncapsulation.Emulated, ViewEncapsulation.Native and ViewEncapsulation.None This article describes what is View Encapsulation using an example and how it is implemented in angular. We also learn what is shadow dom in Angular.

View Encapsulation in Angular Read More »

Introduction to Shadow DOM

This guide shows you what is shadow DOM and how to use it with a simple example. The CSS Styles are global in scope. The styles affect the entire web site, irrespective of where they are placed in the page. The global scoped CSS rules has few advantageous. For Example you can set the font of the entire web site at one place. But it also makes it easier to break the site. The CSS rules might target unwanted elements or clash with other CSS selectors. Similarly the JavaScript may also accidentally modify unintended parts of the app.

Introduction to Shadow DOM Read More »

Scroll to Top