Skip to content

mat-card-(sub)title wrong margin #19069

Closed
@saithis

Description

@saithis

Bug, feature request, or proposal:

when using mat-card with a mat-card-(sub)title but without a mat-card-avatar, then the title still has a left margin and is not aligned with the content text.

What is the expected behavior?

The title and content text should be aligned like show here https://material.io/components/cards when checking the "Supporting text" box.

What is the current behavior?

The title is not aligned with the content text. (title has a margin left, but content doesn't)

What are the steps to reproduce?

https://stackblitz.com/edit/angular-card-header-bug

What is the use-case or motivation for changing an existing behavior?

It looks wrong and doesn't follow the material design guide.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

I tested it with the following:
angular 9.1
angular material 9.2
Windows 10
Typescript 3.8
Chrome and Firefox

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/card

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions