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/_action-button.scss | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/objects/_action-button.scss') diff --git a/src/objects/_action-button.scss b/src/objects/_action-button.scss index cfd859c..48ac2a6 100644 --- a/src/objects/_action-button.scss +++ b/src/objects/_action-button.scss @@ -4,9 +4,10 @@ @include iro.props-namespace('action-button') { @include iro.props-store(( --dims: ( - --pad-x: fn.global-dim(--size --125), - --pad-y: fn.global-dim(--size --125), - --rounding: 3px, + --line-height: 1.4, + --pad-x: fn.global-dim(--size --100), + --pad-y: fn.global-dim(--size --85), + --rounding: 3px, ), ), 'dims'); @@ -80,7 +81,7 @@ border-radius: fn.dim(--rounding); background-color: fn.color(--disabled --bg); color: fn.color(--disabled --label); - line-height: 1; + line-height: fn.dim(--line-height); text-align: center; text-decoration: none; text-overflow: ellipsis; @@ -212,8 +213,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.2.3-70-g09d2