Skip to content
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

fix(material/button): fix raised button line-height #28073

Merged
merged 1 commit into from
Nov 9, 2023
Merged
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
4 changes: 4 additions & 0 deletions src/material/button/_button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@
@include mdc-helpers.using-mdc-typography($theme) {
@include mdc-button.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
}

.mat-mdc-raised-button {
line-height: inherit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we tried putting this in the component base styles? I'm fine with having it here if it helps us land the changes, but it technically should be in the base.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried putting these in the components base styles, I also ran into an issue where some teams just aren't pulling in theme styles. As you can imagine, setting the line-height: inherit at a slightly higher specificity there resulted in a bunch of failures, so I moved the override over to the theme styles. This way, the override is right after the line-height: 36px coming from the without-ripple mixin on line 169, and it doesn't get pulled in for teams that aren't pulling in theme styles

Also, this will only be here temporarily. I need to land this change for each of the variants so that ripping out the without-ripple is feasible. Once these have landed, I'll then swap the without-ripple for our tokens and then I can remove these styles altogether

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. It's not a blocker.

}
}

@mixin density($theme) {
Expand Down
Loading