Sharing Top Content from the Angular-sphere.

CSS Encapsulation with Angular 2 Components

  • None // Use to disable CSS Encapsulation for this component }) export class SecondComponent { constructor() { } }
  • If CSS is needed to be shared across components create global utility classes and do not copy the CSS over and over between components.
  • Angular offers an easy way to disable CSS encapsulation.
  • Sometimes although rare, there are occasions where we would like a component’s CSS to not be encapsulated and apply globally to our application.
  • Each component’s CSS is scoped and overrides our base border color.

Read the full article, click here.

@SplinterCode: “CSS Encapsulation with Angular 2 Components

#angular2 #angularjs #css”

A intro on how to better encapsulate your CSS in Angular 2 components. Also learn the different encapsulation techniques and CSS best practices.

CSS Encapsulation with Angular 2 Components

Comments are closed, but trackbacks and pingbacks are open.