Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
saithis opened this issue Apr 14, 2020 · 1 comment · Fixed by #19072
Closed

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

saithis opened this issue Apr 14, 2020 · 1 comment · Fixed by #19072
Assignees
Labels
area: material/card P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@saithis
Copy link

saithis commented Apr 14, 2020

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?

@crisbeto crisbeto self-assigned this Apr 14, 2020
@crisbeto crisbeto added has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Apr 14, 2020
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 14, 2020
The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes angular#19069.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 17, 2020
The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes angular#19069.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 17, 2020
The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes angular#19069.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 2, 2021
The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes angular#19069.
crisbeto added a commit to crisbeto/material2 that referenced this issue May 4, 2021
The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes angular#19069.
crisbeto added a commit to crisbeto/material2 that referenced this issue May 4, 2021
…esn't have an avatar

The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes angular#19069.
andrewseguin pushed a commit that referenced this issue Mar 3, 2022
…esn't have an avatar (#19072)

The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes #19069.

(cherry picked from commit 557f8bc)
andrewseguin pushed a commit that referenced this issue Mar 3, 2022
…esn't have an avatar (#19072)

The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes #19069.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 3, 2022
forsti0506 pushed a commit to forsti0506/components that referenced this issue Apr 3, 2022
…esn't have an avatar (angular#19072)

The card header margin was set up assuming that there would always be an avatar element, but that's not always the case. These changes add an extra check to avoid the extra margin.

Fixes angular#19069.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/card P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
3 participants