On one of my pages, I have a mat-form-field:
<mat-form-field class="form-control-full-width">
<input type="text" matInput placeholder="First Name" formControlName="firstNameFC" required>
<mat-error *ngIf="hasNewUserError('firstNameFC', 'required') && isNewUserSubmitted">
First Name is required
</mat-error>
</mat-form-field>
I have applied the following CSS to style it:
.mat-form-field-label {
/*change color of label*/
color: white !important;
}
.mat-form-field-underline {
/*change color of underline*/
background-color: white !important;
}
.mat-form-field-ripple {
/*change color of underline when focused*/
background-color: white !important;;
}
.mat-input-element{
color: white !important;
}
The CSS is working as expected for this page. However, I now have another mat-form-field on a different page and I want to apply different CSS (color: green, background-color: white) to that field.
Is it possible to apply different CSS styles to controls on different pages?