I am trying to style a mat-tab locally,
I understand that :ng-deep affects the style to be global,
But is there a way to change style per component?
Thanks!
it is possible to apply styles to only one mat-table component. i handled this by wrapping the styles which i want to apply inside the selector of the component. so inside your root styles.scss you can do something like this.
// styles.scss
parent-component-selector {
mat-table {
background-color: black;
}
}
this will apply the styles only when the mat-table is inside the parent-component selector.