1

I find myself switching to ViewEncapsulation.None because I need to manipulate some child component's css, which does not seem possible with View encapsulation, as /deep/ was deprecated.

Are there any actual (performance perhaps?) drawbacks on using no ViewEncapsulation if my styles are manually scoped to the component? This seems to be able to manipulate the styles of child components correctly:


my-component {
  ... styles ...

  subcomponent {
    .gallery-item {
      cursor: pointer;
    }
  }
}

Ákos Vandra-Meyer
  • 1,890
  • 1
  • 23
  • 40
  • https://stackoverflow.com/questions/47024236/what-to-use-in-place-of-ng-deep/58081817#58081817 – WSD May 24 '20 at 09:51
  • That basically just describes what I am doing, but does not answer the question on what drawbacks this approach has over using ViewEncapsulation – Ákos Vandra-Meyer May 24 '20 at 10:00

0 Answers0