angular / angular/components

bug(mdc-card): Negative margin on subtitle

Open
#24,824 2 comments 0 reactions 0 assignees View on GitHub
area: material/card P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

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

The card subtitle has a negative margin, causing it to run into the card title

### Reproduction

https://stackblitz.com/edit/angular-wro35c-pjrlt2?file=src%2Fapp%2Fcard-subtitle-example.html

### Expected Behavior

Should look more spaced

### Actual Behavior

Shouldnt run into each other

### Environment

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

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction, especially src/app/card-subtitle-example.html, and verify the subtitle and title overlap. Trace the Angular Material MDC card subtitle styling that produces the negative margin. Done means the subtitle has visible spacing from the title and the reproduction no longer shows them running into each other.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
design, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.