1

How can I make the app-dropdown-select use the style of component A?

component A:

This can be use to make the parent use child component's style:

encapsulation: ViewEncapsulation.None

Is there something like this to make parent style override the child style?

el_pup_le
  • 11,711
  • 26
  • 85
  • 142

1 Answers1

1

You can override the encapsulation with the ::ng-deep piercing CSS combinator (see docs) in the parent (add !important if needed) but it is deprecated because each component must remain modular and autonomous, without causing conflicts between them.

You should prefer using SASS variables and CSS import.

Maarti
  • 3,600
  • 4
  • 17
  • 34