Changing border color in mat-form-field

前端 未结 8 1508
猫巷女王i
猫巷女王i 2020-12-14 22:59

I am using angular material mat-form-field. I have a dark background, and therefore am trying to change the border of the form-field to white. But I am not able

8条回答
  •  孤街浪徒
    2020-12-14 23:43

    For the newer outlined form fields, solved it this way:

    ::ng-deep {
         .mat-form-field-appearance-outline .mat-form-field-outline {
            color: white;
         }
         mat-form-field {
            .mat-hint, input, ::placeholder, .mat-form-field-label {
               color: white;
            }
         }
      }
    

提交回复
热议问题