Skip to content

bug(schematics): MDC migration: <mat-card> is migrated to appearance=outlined, which is not the MDC standard #27004

Open
@ursmeili

Description

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

According to https://m2.material.io/components/cards#anatomy, and https://material-components.github.io/material-components-web-catalog/#/component/card, the standard for cards seems to be "raised". Also, <mat-card> without an appearance attribute defaults to raised.

However, MDC migration for angular V15 always changes <mat-card> to <mat-card appearance='outlined /> (see https://github.com/angular/components/pull/24566/files#diff-b75b20ff5d2952053d36ef0a202e088d8533fb2e45be536f37973d923cdb0482).

Why is that? I didn't find any documentation what's the reasoning for this. Shouldn't Angular material match the Material Design Guidelines as close as possible?

Reproduction

Steps to reproduce:

  1. write an angular component which uses <mat-card> in Angular V14
  2. migrate to Angular V15 material design according to https://github.com/angular/components/blob/main/guides/v15-mdc-migration.md#how-to-migrate

Expected Behavior

<mat-card> remains the same, without any additional appearance (so takes the default raised appearance)

Actual Behavior

<mat-card> now becomes <mat-card appearance='outlined>`

Environment

Angular CLI: 15.2.6
Node: 18.15.0
Package Manager: pnpm 7.29.1
OS: win32 x64

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/schematicscdk/schematics is *not* a public APIarea: material/card

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions