Skip to content

Commit

Permalink
fix(material/button-toggle): standard button toggle strong focus bord… (
Browse files Browse the repository at this point in the history
#28790)

* fix(material/button-toggle): standard button toggle strong focus border-radius

* fixup! fix(material/button-toggle): standard button toggle strong focus border-radius

* fixup! fix(material/button-toggle): standard button toggle strong focus border-radius

* fixup! fix(material/button-toggle): standard button toggle strong focus border-radius

* fixup! fix(material/button-toggle): standard button toggle strong focus border-radius

(cherry picked from commit 46db6a6)
  • Loading branch information
wagnermaciel committed Mar 28, 2024
1 parent 58faa94 commit 7ccc392
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/material/button-toggle/button-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,23 @@ $_standard-tokens: (
border: 0;
}
}

// Change the border-radius of the focus indicator to match the
// radius of the button-toggle-group or standalone button-toggle.
@include token-utils.use-tokens($_standard-tokens...) {
.mat-button-toggle-standalone.mat-button-toggle-appearance-standard {
@include token-utils.create-token-slot(--mat-focus-indicator-border-radius, shape);
}

.mat-button-toggle-group-appearance-standard .mat-button-toggle {
&:last-of-type .mat-button-toggle-button::before {
@include token-utils.create-token-slot(border-top-right-radius, shape);
@include token-utils.create-token-slot(border-bottom-right-radius, shape);
}

&:first-of-type .mat-button-toggle-button::before {
@include token-utils.create-token-slot(border-top-left-radius, shape);
@include token-utils.create-token-slot(border-bottom-left-radius, shape);
}
}
}

0 comments on commit 7ccc392

Please sign in to comment.