Skip to content

Commit 29f1da4

Browse files
kseamonandrewseguin
authored andcommitted
perf(material/button): Change frequently missed descendant selectors to child selectors (#30385)
(cherry picked from commit 21586ae)
1 parent 5d6d25f commit 29f1da4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/material/button/_button-base.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
@include layout-common.fill();
5353
}
5454

55-
&:focus .mat-focus-indicator::before {
55+
&:focus > .mat-focus-indicator::before {
5656
content: '';
5757
}
5858
}
@@ -78,12 +78,12 @@
7878
&.cdk-program-focused,
7979
&.cdk-keyboard-focused,
8080
&.mat-mdc-button-disabled-interactive:focus {
81-
.mat-mdc-button-persistent-ripple::before {
81+
> .mat-mdc-button-persistent-ripple::before {
8282
@include token-utils.create-token-slot(opacity, focus-state-layer-opacity);
8383
}
8484
}
8585

86-
&:active .mat-mdc-button-persistent-ripple::before {
86+
&:active > .mat-mdc-button-persistent-ripple::before {
8787
@include token-utils.create-token-slot(opacity, pressed-state-layer-opacity);
8888
}
8989
}

0 commit comments

Comments
 (0)