Skip to content

Commit

Permalink
fix(material/card): Adds original padding for a card footer
Browse files Browse the repository at this point in the history
The mat-progress-bar overflows when placed in the mat-card-footer.
Content should not extend beyond the borders of the card

Fixes angular#28785
  • Loading branch information
lsamboretrorabbit committed Apr 5, 2024
1 parent 2b49d8c commit b1579f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/material/card/card.scss
Expand Up @@ -98,6 +98,8 @@ $mat-card-default-padding: 16px !default;
}
}



// Header section at the top of a card. MDC does not have a pre-made header section for cards.
// Maintained here for backwards compatibility with the previous generation MatCard.
.mat-mdc-card-header {
Expand All @@ -111,6 +113,16 @@ $mat-card-default-padding: 16px !default;
padding: $mat-card-default-padding $mat-card-default-padding 0;
}

// Footer section at the bottom of a card. MDC does not have a pre-made footer section for cards.
// Maintained here for backwards compatibility with the previous generation MatCard.
.mat-mdc-card-header {
display: flex;

// Apply default padding for the footer region. Omit any bottom padding because we assume
// this region will be followed by another region that includes top padding.
padding: $mat-card-default-padding $mat-card-default-padding 0;
}

// Primary card content. MDC does not have a pre-made section for primary content.
// Adds the default 16px padding to the content. Maintained here for backwards compatibility
// with the previous generation MatCard.
Expand Down

0 comments on commit b1579f7

Please sign in to comment.