angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.4k stars 6.76k forks source link

bug(update): ng update is not migrating mat-font-size #25010

Open iKrishnaSahu opened 2 years ago

iKrishnaSahu commented 2 years ago

Is this a regression?

The previous version in which this bug was not present was

No response

Description

ng update is not migrating mat-font-size

Reproduction

Steps to reproduce:

  1. Have a style file which is using mat-font-size mixin
  2. Run ng update @angular/core@13 @angular/cli@13 @angular/cdk@13 @angular/material@13
  3. Check if mat-font-size is migrating to mat.font-size

Expected Behavior

ng update should migrate mat-font-size

Actual Behavior

ng update is not migrating mat-font-size

Environment

crisbeto commented 2 years ago

Can you post what the unmigrated code looks like? The old mat-font-size is a Sass function, not a mixin.

iKrishnaSahu commented 2 years ago

Can you post what the unmigrated code looks like? The old mat-font-size is a Sass function, not a mixin.

@import "@angular/material/theming";

$config: (
    display-3: (
        font-size: 56px,
        font-weight: 400,
        line-height: 56px,
    ),
);

.custom-class {
    @debug mat-font-size($config, display-3);
    font-size: mat-font-size($config, display-3);
}