Skip to content

Commit 5851c91

Browse files
crisbetovivian-hu-zz
authored andcommitted
fix(button-toggle): svg icon not align inside toggle (#13839)
Fixes the `svg` node inside the icon being shifted down inside a button toggle. Fixes #13726.
1 parent 41bb296 commit 5851c91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/button-toggle/button-toggle.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ $mat-button-toggle-legacy-border-radius: 2px !default;
4848
white-space: nowrap;
4949
position: relative;
5050

51+
// Fixes SVG icons that get thrown off because of the `vertical-align` on the parent.
52+
.mat-icon svg {
53+
vertical-align: top;
54+
}
55+
5156
&.cdk-keyboard-focused {
5257
.mat-button-toggle-focus-overlay {
5358
opacity: 1;

0 commit comments

Comments
 (0)