Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/components/card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ Output:

<img src="https://material.angularjs.org/material2_assets/cards/sections-card-min.png">

#### Preset shortcuts

`md-card-actions` has a few layout shortcuts. You can add `align="end"` to align the buttons at the end of
the main axis (flex-end). The default is `align="start"` (flex-start).

### Preset layouts

You can also leverage preset layouts that format some of the sections together.
Expand Down
5 changes: 5 additions & 0 deletions src/components/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ md-card-actions {
margin-left: -16px;
margin-right: -16px;
padding: 8px 0;

&[align='end'] {
display: flex;
justify-content: flex-end;
}
}

[md-card-image] {
Expand Down
4 changes: 4 additions & 0 deletions src/demo-app/card/card-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<md-card-content>
<p>Here is some content</p>
</md-card-content>
<md-card-actions align="end">
<button md-button>LIKE</button>
<button md-button>SHARE</button>
</md-card-actions>
</md-card>

<md-card>
Expand Down