Reputation: 423
Just take a look to the image:
Basically, I want to change/remove the background color (the gray one) on this mat-option element. I also tried with the browser inspector in order to find the class that has the background-color line, but I couldn't find nothing.
Any idea?
Upvotes: 3
Views: 9725
Reputation: 18941
You'll need to either:
::ng-deep .mat-form-field-appearance-fill .mat-form-field-flex {
background-color: #fff;
}
Upvotes: 4
Reputation: 473
Just type in your css style:
::ng-deep
.mat-form-field-type-mat-select:not(.mat-form-field-disabled)
.mat-form-field-flex {
background-color: transparent !important;
}
here a demo: https://stackblitz.com/edit/angular-pj5rjj-hnmy6q?file=app%2Fsidenav-position-example.css
Upvotes: 1
Reputation: 1743
You can try:
.mat-form-field-appearance-fill .mat-form-field-flex {
background-color: red;
}
That did the trick for me.
Upvotes: 3