From 5851c915c65283742d1c2a86ea1ecaa3581fecef Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Sat, 10 Nov 2018 00:06:27 +0000 Subject: [PATCH] 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. --- src/lib/button-toggle/button-toggle.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/button-toggle/button-toggle.scss b/src/lib/button-toggle/button-toggle.scss index aa6ffad971e..02e4f2c09d1 100644 --- a/src/lib/button-toggle/button-toggle.scss +++ b/src/lib/button-toggle/button-toggle.scss @@ -48,6 +48,11 @@ $mat-button-toggle-legacy-border-radius: 2px !default; white-space: nowrap; position: relative; + // Fixes SVG icons that get thrown off because of the `vertical-align` on the parent. + .mat-icon svg { + vertical-align: top; + } + &.cdk-keyboard-focused { .mat-button-toggle-focus-overlay { opacity: 1;