To add on top of @adrian-sawicki's answer, it's also better to turn off View Encapsulation below:
@Component({
selector: 'list',
templateUrl: './list.component.html',
styleUrls: ['./list.component.css'],
encapsulation: ViewEncapsulation.None
})
Once you have done this, you don't have to rely on ::ng-deep
or :host ::ng-deep
etc as they are deprecated.
For instance, if you want to override padding for mat-list-item, all you have to do is
.example-container .mat-list-base .mat-list-item .mat-list-item-content {
padding: 0 !important;
}