Skip to content

bug(MatButton): Migration tool does not migrate mat-flat-button styles. #26114

Closed
@MarcinMarcinkowski

Description

@MarcinMarcinkowski

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

After update my codebase to Materiial v15 with this command :
ng update @angular/material^15
i used migration tool :
ng generate @angular/material:mdc-migration

Reproduction

Steps to reproduce:

  1. Prepare project in angular v14
  2. Create button with mat-flat-button directive
  3. Update angular to v15
  4. Update material to v15
  5. User Migration tool

Expected Behavior

The scss clases related to mat flat button should be changed into :
mat-mdc-unelevated-button

My expected scss:

@use '@angular/material' as mat;

@mixin buttons-theme($theme) {
  $accent: map-get($theme, accent);
  $primary: map-get($theme, primary);
  $warn: map-get($theme, warn);

  .mat-mdc-unelevated-button {
    margin: 10px 0;
    border-radius: $button-border-radius;
    color: $neutral-00;
    min-height: 56px;
    font-size: $medium-text;
    font-weight: $text-weight-medium;
  }

}

Actual Behavior

The scss clases related to mat flat button was changed into :
mat-mdc-flat-button

My scss after migration:

@use '@angular/material' as mat;

@mixin buttons-theme($theme) {
  $accent: map-get($theme, accent);
  $primary: map-get($theme, primary);
  $warn: map-get($theme, warn);

  .mat-mdc-flat-button {
    margin: 10px 0;
    border-radius: $button-border-radius;
    color: $neutral-00;
    min-height: 56px;
    font-size: $medium-text;
    font-weight: $text-weight-medium;
  }

}

Environment

  • Angular: 15
  • CDK/Material: 15
  • Browser(s): -
  • Operating System (e.g. Windows, macOS, Ubuntu):-

Metadata

Metadata

Assignees

Labels

needs triageThis issue needs to be triaged by the team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions