Skip to content

Commit 17ef700

Browse files
crisbetoannieyw
authored andcommitted
fix(material-experimental/mdc-button): narrow down overly-broad selector (#20969)
Fixes a selector that was targeting all icons on the page, rather than ones inside a button. (cherry picked from commit 92bb1c8)
1 parent d868717 commit 17ef700

File tree

1 file changed

+12
-11
lines changed
  • src/material-experimental/mdc-button

1 file changed

+12
-11
lines changed

src/material-experimental/mdc-button/fab.scss

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@
1616
background: transparent;
1717
opacity: 1;
1818
}
19-
}
2019

21-
// MDC expects the fab icon to contain this HTML content:
22-
// ```html
23-
// <span class="mdc-fab__icon material-icons">favorite</span>
24-
// ```
25-
// However, Angular Material expects a `mat-icon` instead. The following
26-
// will extend the `mdc-fab__icon` styling to the mat icon. Note that
27-
// the extended styles inherently only match icons that nest themselves in
28-
// a parent `mdc-fab`.
29-
.mat-icon {
30-
@extend .mdc-fab__icon;
20+
// MDC expects the fab icon to contain this HTML content:
21+
// ```html
22+
// <span class="mdc-fab__icon material-icons">favorite</span>
23+
// ```
24+
// However, Angular Material expects a `mat-icon` instead. The following
25+
// will extend the `mdc-fab__icon` styling to the mat icon. Note that
26+
// the extended styles inherently only match icons that nest themselves in
27+
// a parent `mdc-fab`.
28+
.mat-icon {
29+
@extend .mdc-fab__icon;
30+
}
3131
}
32+

0 commit comments

Comments
 (0)