Skip to content

Commit 464aaf6

Browse files
authored
fix(material/button): add specificity to icon button density (#26911)
1 parent 69ffdad commit 464aaf6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/material/button/_icon-button-theme.scss

+4-6
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,14 @@ $_icon-size: 24px;
8484
$property-name: size,
8585
);
8686

87-
.mat-mdc-icon-button {
88-
@include mdc-icon-button-theme.theme((
89-
state-layer-size: $calculated-size,
90-
));
91-
}
92-
9387
// Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
9488
.mat-mdc-icon-button.mat-mdc-button-base {
9589
// Match the styles that used to be present. This is necessary for backwards
9690
// compat to match the previous implementations selector count (two classes).
91+
@include mdc-icon-button-theme.theme((
92+
state-layer-size: $calculated-size,
93+
));
94+
9795
// TODO: Switch calculated-size to "var(--mdc-icon-button-state-layer-size)"
9896
// Currently fails validation because the variable is "undefined"
9997
// in the sass stack.

0 commit comments

Comments
 (0)