For Angular 7 and Material 7, this worked for me:
/* Placeholder overrides */
:host ::ng-deep input::-webkit-input-placeholder {
color: rgba(255,255,255, 0.7) !important;
}
:host ::ng-deep input:-moz-placeholder { /* Firefox 18- */
color: rgba(255,255,255, 0.7) !important;
}
:host ::ng-deep input::-moz-placeholder { /* Firefox 19+ */
color: rgba(255,255,255, 0.7) !important;
}
:host ::ng-deep input:-ms-input-placeholder {
color: rgba(255,255,255, 0.7) !important;
}
For the underline, I used an outline styled input but you can just change the class used.
/* Appearance around each input/button to remove faded outline
but put the dark hover back in */
::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline {
color: transparent !important;
}
::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-thick {
color: rgba(255, 255, 255, 0.87) !important;
}
While I don't think this is the best way of doing it, especially using ::ng-deep, it's the only thing that works right now for a specific component, for me.