From f6a625881c20f7a5073076bbc66ed2f2c1dfb44d Mon Sep 17 00:00:00 2001 From: Carlo Nomes Date: Thu, 3 Jan 2019 17:21:36 +0100 Subject: [PATCH] fix(stark-ui): properly scale svg from mat-icon replaced fixed size of 18px with `transform: scale(.75)` the default is 24px so it should scale to 18px ISSUE: #732 --- .../stark-ui/assets/themes/_button-theme.scss | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/packages/stark-ui/assets/themes/_button-theme.scss b/packages/stark-ui/assets/themes/_button-theme.scss index 27cee74c0a..c9a2588c58 100644 --- a/packages/stark-ui/assets/themes/_button-theme.scss +++ b/packages/stark-ui/assets/themes/_button-theme.scss @@ -1,13 +1,13 @@ -$icon-size: 18px; - @mixin stark-button-color($color, $contrast) { &.mat-button, &.mat-icon-button, &.mat-stroked-button { color: $color; + .mat-button-focus-overlay { background-color: rgba($color: $color, $alpha: 0.12); } + .mat-ripple-element { background-color: rgba($color: $color, $alpha: 0.1); } @@ -18,6 +18,7 @@ $icon-size: 18px; &.mat-mini-fab { color: $contrast; background-color: $color; + .mat-ripple-element { background-color: rgba($color: $contrast, $alpha: 0.1); } @@ -50,13 +51,7 @@ $icon-size: 18px; } .mat-icon.stark-small-icon { - line-height: $icon-size; - height: $icon-size; - width: $icon-size; - svg { - height: $icon-size; - width: $icon-size; - } + transform: scale(0.75); } .mat-button, @@ -68,13 +63,3 @@ $icon-size: 18px; .mat-mini-fab { text-transform: uppercase; } - -button { - &.mat-mini-fab, - &.mat-fab { - line-height: $icon-size; - .mat-button-wrapper { - line-height: $icon-size; - } - } -}