Try doing it in this form, in the scss file of the HTML where are using the material component (for intance, for
:host ::ng-deep {
label {
display: block;
font-size: 0.9rem !important;
font-weight: 500 !important;
color: #9296a5 !important;
line-height: 17px !important;
font-family: "Roboto" !important;
margin-bottom: 0.2rem !important;
}
.index-text-input {
max-width: 100%;
}
.mat-table {
background:red;
}
.mat-cell-input {
background:blue;
}
}
It's just an example. You have to select the element and inspect the name wich angular material give in your html, in order to know the exact name you have to use for overriding the specific element.