How to override child component css from parent component

You can use the ::ng-deep pseudo class.

::ng-deep .child_container {
  align-items: center;
  background-color: green;
  width: 100px;
  height: 100px;
}


Note: ::ng-deep has been marked as deprecated for since a few versions now, but they will not remove support until they have a workaround.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments