-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(card): align with 2018 material design spec #12731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/lib/card/card.scss
Outdated
width: calc(100% + 48px); | ||
margin: 0 -24px 16px -24px; | ||
width: calc(100% + #{$mat-card-padding * 2}); | ||
margin: 0 $mat-card-padding * -1 16px $mat-card-padding * -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: why not just -$mat-card-padding
? Maybe just a preference though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because SASS evaluates the last two margins to 16px - $mat-card-padding
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(-$mat-card-padding)
?
src/lib/card/card.scss
Outdated
margin-left: -16px; | ||
margin-right: -16px; | ||
margin-left: $mat-card-padding / -2; | ||
margin-right: $mat-card-padding / -2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer this to be -($mat-card-padding / 2)
or -$mat-card-padding / 2
src/lib/card/card.scss
Outdated
width: calc(100% + 48px); | ||
margin: 0 -24px 16px -24px; | ||
width: calc(100% + #{$mat-card-padding * 2}); | ||
margin: 0 $mat-card-padding * -1 16px $mat-card-padding * -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(-$mat-card-padding)
?
a974460
to
7e2c332
Compare
Feedback has been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Caretaker note: definitely going to be a lot of screen diffs on this one |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
3 similar comments
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Aligns the card component with the latest Material Design spec. Also fixes an issue where the border radius wasn't being applied to the image inside the card.
354e0b9
to
ddaf2f0
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Aligns the card component with the latest Material Design spec. Also fixes an issue where the border radius wasn't being applied to the image inside the card.