From b269fd5886173fdb1c40916559edcb9d09613e27 Mon Sep 17 00:00:00 2001 From: telegine Date: Tue, 26 Mar 2024 21:55:23 +0300 Subject: [PATCH] fix(Button): add negative margin to support bigger icon size --- src/components/Button/Button.scss | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 636c8a8c8c..e045f33d19 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -261,7 +261,16 @@ $block: '.#{variables.$ns}button'; &__icon { display: inline-block; position: relative; - width: var(--g-button-height, var(--_--icon-size)); + margin: 0 + calc( + ( + var(--g-button-height, var(--_--height)) - var( + --g-button-icon-size, + var(--_--icon-size) + ) + ) / 2 * -1 + ); + width: var(--g-button-height, var(--_--height)); height: var(--g-button-height, var(--_--height)); pointer-events: none;