Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

refactor(button): Remove button's dependency on typography, by specifying letter-spacing #871

Merged
merged 1 commit into from
Jun 29, 2017
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
7 changes: 3 additions & 4 deletions packages/mdc-button/mdc-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
@import "@material/elevation/mixins";
@import "@material/ripple/mixins";
@import "@material/theme/mixins";
@import "@material/typography/mixins";

// postcss-bem-linter: define button

.mdc-button {
@include mdc-ripple-base;
@include mdc-ripple-bg((pseudo: "::before"));
@include mdc-ripple-fg((pseudo: "::after"));
@include mdc-typography(body2);
@include mdc-theme-prop(color, text-primary-on-light);

display: inline-block;
Expand All @@ -39,9 +37,10 @@
border-radius: 2px;
outline: none;
background: transparent;
font-size: 14px; // Override font to specifically be px as spec defined pt
font-size: 14px;
font-weight: 500;
line-height: 36px; // Override line-height so text aligns centered
letter-spacing: .04em;
line-height: 36px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
Expand Down
3 changes: 1 addition & 2 deletions packages/mdc-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@material/animation": "^0.2.3",
"@material/elevation": "^0.1.9",
"@material/ripple": "^0.7.0",
"@material/theme": "^0.1.5",
"@material/typography": "^0.2.2"
"@material/theme": "^0.1.5"
}
}