Issue
I am not looking to change the placeholder color as I've already got that done, but after selecting an option the text color is still black.
This is my HTML
<form *ngIf="videos">
<mat-form-field class="search-form">
<input type="text" placeholder="Search Gamer-Tags" aria-label="Number" matInput [formControl]="myControl"
[matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete" autoActiveFirstOption (optionSelected)='searchChange($event.option.value)'>
<mat-option class="auto-option" *ngFor="let option of filteredOptions | async" [value]="option">
{{option}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</form>
This is my SCSS
::ng-deep .mat-focused .mat-form-field-label {color: white !important;}
::ng-deep .mat-form-field-underline, ::ng-deep .mat-form-field-ripple {background-color: white !important; color: white !important }
::ng-deep .mat-form-field-empty.mat-form-field-label { color: white !important;}
::ng-deep .mat-form-field-ripple { background-color: white;}
Solution
I did find out how to change it, needed to add this code to change the input's class color.
::ng-deep input.mat-input-element { color: white; }
Answered By - AndreRoque
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.