我在设置深色背景下的占位符颜色为白色时遇到了问题,当设置为白色时,会出现奇怪的描边,如下所示:
。
![enter image description here](https://istack.dev59.com/byw6i.webp)
https://stackblitz.com/edit/angular-twbzew-ealbnk
<mat-form-field>
<mat-select [ngClass]="className" placeholder="{{someText}}">
<mat-option *ngFor="let item of items" [value]="item.value">
{{ item.viewValue }}
</mat-option>
</mat-select>
</mat-form-field>
.basic-container {
background: black;
padding: 5px;
}
.class1 .mat-select-placeholder {
color:white !important;
}