Skip to content

fix(material-experimental/mdc-button): remove unthemed icon color #22281

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

Merged
merged 1 commit into from
Mar 19, 2021
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
7 changes: 0 additions & 7 deletions src/material-experimental/mdc-button/_button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,6 @@ $mat-fab-state-target: '.mdc-fab__ripple';
@include mdc-ripple-theme.states(
$query: mdc-helpers.$mat-theme-styles-query, $ripple-target: $mat-button-state-target);

&.mat-unthemed {
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this was added by you in #16986. I don't remember the context, but maybe there was a specific reason for it? If that's not the case, should we remove the class binding as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the buttons apply MDC's purple color by default, except for the icon button which has color: inherit. In the other cases, they do need this "unthemed" style to make sure they override the purple. I think this is to just make sure the spec is matched since icon buttons show up on the toolbar, but other buttons don't

@include mdc-ripple-theme.states-base-color(mdc-theme-color.$on-surface,
$query: mdc-helpers.$mat-theme-styles-query, $ripple-target: $mat-button-state-target);
@include mdc-icon-button.ink-color(mdc-theme-color.$on-surface,
$query: mdc-helpers.$mat-theme-styles-query);
}

&.mat-primary {
@include mdc-ripple-theme.states-base-color(primary,
$query: mdc-helpers.$mat-theme-styles-query,
Expand Down