Skip to content

Commit

Permalink
perf(material/button): Change frequently missed descendant selectors …
Browse files Browse the repository at this point in the history
…to child selectors (#30385)

(cherry picked from commit 21586ae)
  • Loading branch information
kseamon authored and andrewseguin committed Jan 27, 2025
1 parent 5d6d25f commit 29f1da4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/material/button/_button-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
@include layout-common.fill();
}

&:focus .mat-focus-indicator::before {
&:focus > .mat-focus-indicator::before {
content: '';
}
}
Expand All @@ -78,12 +78,12 @@
&.cdk-program-focused,
&.cdk-keyboard-focused,
&.mat-mdc-button-disabled-interactive:focus {
.mat-mdc-button-persistent-ripple::before {
> .mat-mdc-button-persistent-ripple::before {
@include token-utils.create-token-slot(opacity, focus-state-layer-opacity);
}
}

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

0 comments on commit 29f1da4

Please sign in to comment.