Skip to content

Commit

Permalink
fix(material/button-toggle): incorrect shape of focus indicator in ve…
Browse files Browse the repository at this point in the history
…rtical group (#30376)

Fixes that the first/last buttons in a vertical button group had the wrong shape.

Fixes #30368.

(cherry picked from commit e91d509)
  • Loading branch information
crisbeto committed Jan 23, 2025
1 parent 8ba411f commit b683474
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/material/button-toggle/button-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ $_standard-tokens: (
@include token-utils.create-token-slot(--mat-focus-indicator-border-radius, shape);
}

.mat-button-toggle-group-appearance-standard .mat-button-toggle {
.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .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);
Expand All @@ -397,4 +397,16 @@ $_standard-tokens: (
@include token-utils.create-token-slot(border-bottom-left-radius, shape);
}
}

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

&:first-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-top-left-radius, shape);
}
}
}

0 comments on commit b683474

Please sign in to comment.