From 0855207eda7258f84aebd8b6b35adc7ec7365192 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 23 Apr 2024 17:51:49 +0200 Subject: Button fixes to handle icons without margin adjustments --- src/objects/_button.scss | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/objects/_button.scss') diff --git a/src/objects/_button.scss b/src/objects/_button.scss index b830475..7cc24fa 100644 --- a/src/objects/_button.scss +++ b/src/objects/_button.scss @@ -43,13 +43,14 @@ @include iro.props-namespace('button') { @include iro.props-store(( --dims: ( - --pad-x: fn.global-dim(--size --225), - --pad-y: fn.global-dim(--size --100), - --rounding: 10em, + --line-height: 1.4, + --pad-x: fn.global-dim(--size --225), + --pad-y: fn.global-dim(--size --65), + --rounding: 10em, --lg: ( --pad-x: fn.global-dim(--size --300), - --pad-y: fn.global-dim(--size --150), + --pad-y: fn.global-dim(--size --100), ), ), ), 'dims'); @@ -133,7 +134,7 @@ box-shadow: fn.color(--any --disabled --shadow); color: fn.color(--any --disabled --label); font-weight: 500; - line-height: 1; + line-height: fn.dim(--line-height); text-align: center; text-decoration: none; vertical-align: top; @@ -169,8 +170,9 @@ } @include iro.bem-modifier('round') { - padding-right: fn.dim(--pad-y); - padding-left: fn.dim(--pad-y); + width: calc(1em * fn.dim(--line-height) + 2 * fn.dim(--pad-y)); + padding-right: 0; + padding-left: 0; border-radius: 100em; } } -- cgit v1.3.1