5

Is using ::ng-deep in angular component scss right way of applying styling to third party components like datepicker, multiselect?

1 Answers1

6

It's recommended to avoid using ng-deep as it is marked deprecated.

See here in the angular documentation

There has been raised a question what's the alternative here on stackoverflow

Bernhard
  • 4,855
  • 5
  • 39
  • 70
  • 1
    Is there any other way to style those elements? In the alternative post that you mentioned, does not look a better solution to me. – Idris Rampurawala Jan 30 '19 at 08:25
  • Apply these styles if really unavoidable in global styles or in parent component using a selector to it's child `my-component > child_component {... !important}` and force it `!important`. But if avoidable in any way avoid doing things like this – Bernhard Jan 30 '19 at 09:10