Go ProSign in

Use Angular style encapsulation to avoid styles from leaking into other components

Juri StrumpflohnerJuri Strumpflohner

One of the big challenges of creating truly reusable components is to make sure their styles don’t leak out into the consuming application. Strategies such as CSS modules work but are suboptimal. The web component movement tries to bring a definitive solution to this dilemma but browser support is still lacking. In this lesson we will take a look how Angular helps us with this.

You must be a Member to view code