fix(card): remove unnecessary intermediate div (#1068)

This commit is contained in:
Jeremy Elbourn
2016-08-17 16:23:56 -07:00
committed by GitHub
parent 32eacd29e5
commit b5e1e332d3
3 changed files with 10 additions and 8 deletions
+1 -3
View File
@@ -1,3 +1 @@
<div class="md-card">
<ng-content></ng-content>
</div>
<ng-content></ng-content>
+5 -5
View File
@@ -171,13 +171,13 @@ md-card-title-group {
// top els in md-card-content and md-card can't have their default margin-tops (e.g. <p> tags)
// or they'll incorrectly add to card's top padding
.md-card > :first-child, md-card-content > :first-child {
md-card > :first-child, md-card-content > :first-child {
margin-top: 0;
}
// last els in md-card-content and md-card can't have their default margin-bottoms (e.g. <p> tags)
// or they'll incorrectly add to card's bottom padding
.md-card > :last-child, md-card-content > :last-child {
md-card > :last-child, md-card-content > :last-child {
margin-bottom: 0;
}
@@ -189,7 +189,7 @@ md-card-title-group {
// actions panel on bottom should be 8px from bottom of card
// so must strip 16px from default card padding of 24px
.md-card > md-card-actions:last-child {
md-card > md-card-actions:last-child {
margin-bottom: -16px;
padding-bottom: 0;
}
@@ -216,12 +216,12 @@ md-card-header md-card-subtitle:not(:first-child) {
// xl image should always have 16px on top.
// when it's the first el, it'll need to remove 8px from default card padding of 24px
.md-card > [md-card-xl-image]:first-child {
md-card > [md-card-xl-image]:first-child {
margin-top: -8px;
}
// xl image should always have 16px on bottom
// when it's the last el, it'll need to remove 8px from default card padding of 24px
.md-card > [md-card-xl-image]:last-child {
md-card > [md-card-xl-image]:last-child {
margin-bottom: -8px;
}
+4
View File
@@ -1,4 +1,8 @@
<div class="demo-card-container">
<md-card>
Hello
</md-card>
<md-card>
<md-card-title-group>
<md-card-title>Card with title</md-card-title>