-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typography): typography: Update styles to match guidance as per …
…MDCWeb 0.35.0 material-components/material-components-web#2527 BREAKING CHANGE: Previous typography styles are removed. The new styles are listed in the readme.
- Loading branch information
Showing
8 changed files
with
147 additions
and
183 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,63 +1,63 @@ | ||
@import "@material/button/mdc-button"; | ||
@import "@material/card/mdc-card"; | ||
|
||
.mdc-card-media { | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
// Legacy mdc layout | ||
.mdc-card { | ||
&__title { | ||
@include mdc-typography(body2); | ||
@include mdc-theme-prop(color, text-primary-on-light); | ||
|
||
margin: -0.063rem 0; // -1sp 0 | ||
} | ||
|
||
&__title--large { | ||
@include mdc-typography(headline); | ||
|
||
margin: 0; | ||
} | ||
|
||
&__primary { | ||
padding: 16px; | ||
|
||
// Add extra space before large title. | ||
.mdc-card__title--large { | ||
padding-top: 8px; | ||
} | ||
|
||
// Add extra padding if this is the last block. | ||
&:last-child { | ||
padding-bottom: 24px; | ||
} | ||
} | ||
|
||
&__supporting-text { | ||
@include mdc-typography(body1); | ||
@include mdc-theme-prop(color, text-primary-on-light); | ||
|
||
box-sizing: border-box; | ||
padding: 8px 16px; | ||
|
||
// Remove top padding if immediately preceded by a primary block. | ||
.mdc-card__primary + & { | ||
margin-top: -8px; | ||
padding-top: 0; | ||
} | ||
|
||
// Add extra padding if this is the last block. | ||
&:last-child { | ||
padding-bottom: 24px; | ||
} | ||
} | ||
|
||
&__subtitle { | ||
@include mdc-typography(body1); | ||
@include mdc-theme-prop(color, text-primary-on-light); | ||
|
||
margin: -0.063rem 0; // -1sp 0 | ||
} | ||
} | ||
@import "@material/button/mdc-button"; | ||
@import "@material/card/mdc-card"; | ||
|
||
.mdc-card-media { | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
// Legacy mdc layout | ||
.mdc-card { | ||
&__title { | ||
@include mdc-typography(body2); | ||
@include mdc-theme-prop(color, text-primary-on-light); | ||
|
||
margin: -0.063rem 0; // -1sp 0 | ||
} | ||
|
||
&__title--large { | ||
@include mdc-typography(headline5); | ||
|
||
margin: 0; | ||
} | ||
|
||
&__primary { | ||
padding: 16px; | ||
|
||
// Add extra space before large title. | ||
.mdc-card__title--large { | ||
padding-top: 8px; | ||
} | ||
|
||
// Add extra padding if this is the last block. | ||
&:last-child { | ||
padding-bottom: 24px; | ||
} | ||
} | ||
|
||
&__supporting-text { | ||
@include mdc-typography(body1); | ||
@include mdc-theme-prop(color, text-primary-on-light); | ||
|
||
box-sizing: border-box; | ||
padding: 8px 16px; | ||
|
||
// Remove top padding if immediately preceded by a primary block. | ||
.mdc-card__primary + & { | ||
margin-top: -8px; | ||
padding-top: 0; | ||
} | ||
|
||
// Add extra padding if this is the last block. | ||
&:last-child { | ||
padding-bottom: 24px; | ||
} | ||
} | ||
|
||
&__subtitle { | ||
@include mdc-typography(body1); | ||
@include mdc-theme-prop(color, text-primary-on-light); | ||
|
||
margin: -0.063rem 0; // -1sp 0 | ||
} | ||
} |
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
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
Oops, something went wrong.