This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(card): add an md-card-content container inside md-card for content
Closes #265. BREAKING CHANGE: md-card now requires a separate `md-card-content` element containing the card's content. This was done to fix padding problems with the content. Change your code from this: ```html <md-card> <img src="img/washedout.png" alt="Washed Out"> <h2>Paracosm</h2> <p> The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest Greene's musical language: feel it. </p> </md-card> ``` To this: ```html <md-card> <img src="img/washedout.png" alt="Washed Out"> <md-card-content> <h2>Paracosm</h2> <p> The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest Greene's musical language: feel it. </p> </md-card-content> </md-card> ```
- Loading branch information
Showing
2 changed files
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
$card-padding: 8px; | ||
$card-margin: 8px; | ||
$card-box-shadow: $whiteframe-shadow-z1; | ||
|
||
md-card { | ||
display: block; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
box-shadow: $card-box-shadow; | ||
margin: $card-margin; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
padding: $card-padding; | ||
|
||
.md-card-image { | ||
display: block; | ||
> img { | ||
order: 0; | ||
width: 100%; | ||
} | ||
|
||
md-card-content { | ||
order: 1; | ||
margin: $card-margin; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ajoslin Did you really mean to get rid of the card margin? According to the spec it should have an 8dp margin and the card content should have 16dp padding: