After update to IntelliJ IDEA 2022.1.3 ::ng-deep is deprecated

Viewed 54

As the headline says, I updated the version of IntelliJ and now the angular material selector ::ng-deep is showing me as deprecated.

Example:

<mat-form-field class="register-custom-select">
 <mat-select formControlName="gender" required>
   <mat-option class="register-custom-option" *ngFor="let gender of genders 
   [value]="gender.genderValue">
    {{ gender.genderValue }}
   </mat-option>
  </mat-select>
 </mat-form-field>

::ng-deep .register-custom-select .mat-form-field-underline {
  background-color: #838383;
}

What do I need to change to make the selector no longer deprecated and still have the style?

1 Answers

For me using globale style resolve this

In your style.css yu can add

.register-custom-select .mat-form-field-underline { 
background-color: #838383!important; 
}
Related