Changing border color in mat-form-field

前端 未结 8 1503
猫巷女王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:38

    try this , add/remove ::ng-deep if required

     ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-end {
                    border-radius: 1px !important;
                    border: 1px solid  red;
                    border-left:none;
                  }
                ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-start {
                    border-radius: 1px !important;
                    border: 1px solid red;
                    border-right:none;
                  }
                  ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline-gap {
                    border-radius: 1px !important;
                    border-bottom: 1px solid   red;
                  }
    

提交回复
热议问题