I have a simple form field:
<mat-form-field>
<mat-label>Some label</mat-label>
<input matInput type="text"/>
</mat-form-field>
Default behaviour is, that after clicking onto some part of the form-field the form label is assigned different colour – class mat-focused
is assigned to the mat-form-field
and there is a style with CSS selector .mat-form-field.mat-focused .mat-form-field-label
, which is applied and which assigns different color
.
To illustrate:
Stackblitz
I need this style not to be applied and the easiest way I can see is to prevent the class mat-focused
from being assigned, in other words to prevent mat-form-field
from being focused. Is that possible somehow?
Or any other suggestion?