Search code examples
angularangular-material

Searching for list of CSS selector changes angular (v15 to v17) +material +cdk


I followed this guide: https://material.angular.io/guide/mdc-migration

But there is not any word about which old selector name needs to be changed in which new selector name. I started to check the examples in the angular component docs, but it's really hard to do it for each .mat- selector.

Is there any known documentation of which CSS selectors I need to use now? After updating from Angular 15 to Angular 17 including angular materials, there is so much CSS left, I need to migrate manually, because the automation script did not change much of it.

I tried with IDE (IntelliJ) wide reqExp-replacing using: .mat-(?!mdc) => .mat-mdc

But then I realised, that the angular team only changed a few selectors to .mat-mdc-, others to .mat-cdk-, others to .cdk-, others stay .mat-, and others are a mix of all of these. It's nearly impossible to find out which selector to change into which new name.

Every type of link to a documentation or just a list of ".old-selector" => ".new-selector" is much appreciated.


Solution

  • Try checking this site. It has details about classes not covered by

    ng generate @angular/material:mdc-migration
    

    hope this helps