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-experimental/mdc-button): don't apply styles to icons within the text label #24929

Merged
merged 2 commits into from
Jun 14, 2022
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
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
// However, Angular Material expects a `mat-icon` instead. The following
// mixins will style the icons appropriately.
.mat-mdc-button {
.mat-icon {
& > .mat-icon {
mmalerba marked this conversation as resolved.
Show resolved Hide resolved
@include mdc-button-base.icon();
}
.mdc-button__label + .mat-icon {
Expand All @@ -81,7 +81,7 @@
.mat-mdc-raised-button,
.mat-mdc-outlined-button {
// Icons inside contained buttons have different styles due to increased button padding
.mat-icon {
& > .mat-icon {
@include mdc-button-base.icon();
@include mdc-button-base.icon-contained();
}
Expand Down
4 changes: 2 additions & 2 deletions src/material-experimental/mdc-button/fab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
.mat-mdc-extended-fab {
@include mdc-fab.extended_($query: mdc-helpers.$mat-base-styles-query);

// stylelint-disable-next-line selector-class-pattern
.mat-icon, .material-icons {
& > .mat-icon,
& > .material-icons { // stylelint-disable-line selector-class-pattern
@include mdc-fab.extended-icon-padding(
mdc-fab.$extended-icon-padding,
mdc-fab.$extended-label-padding
Expand Down