diff --git a/src/demo-app/card/card-demo.html b/src/demo-app/card/card-demo.html index f0be370dd7e7..1bb780497625 100644 --- a/src/demo-app/card/card-demo.html +++ b/src/demo-app/card/card-demo.html @@ -13,7 +13,7 @@ Subtitle - Card with title + Card with title and footer

This is supporting text.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

@@ -22,6 +22,9 @@ + + +
diff --git a/src/lib/card/README.md b/src/lib/card/README.md index 14c28409ac0c..63867c319b0e 100644 --- a/src/lib/card/README.md +++ b/src/lib/card/README.md @@ -27,7 +27,7 @@ We also provide a number of preset sections that you can mix and match within th * ``: main content section, intended for blocks of text * ``: stretches image to container width * ``: wraps and styles buttons - * ``: anchors section to bottom of card + * ``: anchors section to bottom of card (e.g progress bar) Example markup for a card with section presets: diff --git a/src/lib/card/card.scss b/src/lib/card/card.scss index 1bdfbfab6401..adfd8ebf4c5a 100644 --- a/src/lib/card/card.scss +++ b/src/lib/card/card.scss @@ -72,7 +72,10 @@ md-card-actions { md-card-footer { position: absolute; + width: 100%; + min-height: 5px; bottom: 0; + left: 0; } md-card-actions { diff --git a/src/lib/card/card.ts b/src/lib/card/card.ts index 9a9f761d70fc..2a249ffdce6b 100644 --- a/src/lib/card/card.ts +++ b/src/lib/card/card.ts @@ -40,6 +40,14 @@ export class MdCardSubtitle {} }) export class MdCardActions {} +/** + * Footer of a card, needed as it's used as a selector in the API. + */ +@Directive({ + selector: 'md-card-footer' +}) +export class MdCardFooter {} + /* @@ -118,11 +126,11 @@ export class MdCardTitleGroup {} @NgModule({ exports: [ MdCard, MdCardHeader, MdCardTitleGroup, MdCardContent, MdCardTitle, MdCardSubtitle, - MdCardActions + MdCardActions, MdCardFooter ], declarations: [ MdCard, MdCardHeader, MdCardTitleGroup, MdCardContent, MdCardTitle, MdCardSubtitle, - MdCardActions + MdCardActions, MdCardFooter ], }) export class MdCardModule {