Encapsulation style (preventing erasure due to the expiration of blood pressure in or out of components) is a major feature of Angular components.
There are various options for achieving the desired result.
@Component({ selector: 'component-b', styles: [` p { color: red; } `] ... encapsulation: ViewEncapsulation.None })
or you can change the CSS selector to cross component borders with the recently introduced (Angular2) CSS shadow piercer combinator >>>
@Component({ selector: 'component-b', styles: [` :host >>> p { color: red; } `] ... })
The second approach works with default encapsulation ( ViewEncapsulation.Emulated ) or encapsulation: ViewEncapsulation.None , but here >>> is redundant. You cannot use >>> with encapsulation: ViewEncapsulation.Native - actually you can currently, but >>> (or the /deep/ equivalent) is deprecated for the shadow DOM.
hint : /deep/ seems to work better with SASS than >>>
source share