From b34545ce5a694a0042f2d1dfbbfad7bfee713c2d Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 20 Jan 2023 16:48:54 +0100 Subject: Fixed flaws --- src/objects/_action-menu.scss | 2 +- src/objects/_avatar.scss | 37 ++++++++++++++++--------------------- src/objects/_icon.scss | 14 +++++++++++--- 3 files changed, 28 insertions(+), 25 deletions(-) (limited to 'src/objects') diff --git a/src/objects/_action-menu.scss b/src/objects/_action-menu.scss index a3e1ca1..3943252 100644 --- a/src/objects/_action-menu.scss +++ b/src/objects/_action-menu.scss @@ -117,7 +117,7 @@ @include iro.bem-elem('icon-slot') { display: flex; justify-content: center; - width: 1em; + width: 1.2em; } } } diff --git a/src/objects/_avatar.scss b/src/objects/_avatar.scss index 5a65fbf..526912f 100644 --- a/src/objects/_avatar.scss +++ b/src/objects/_avatar.scss @@ -21,6 +21,11 @@ @include iro.props-namespace('avatar') { @include iro.props-store(( --dims: ( + --150: ( + --size: fn.global-dim(--size --600), + --font-size: fn.global-dim(--font-size --150), + --indicator-size: fn.global-dim(--size --175), + ), --100: ( --size: fn.global-dim(--size --450), --font-size: fn.global-dim(--font-size --100), @@ -89,27 +94,17 @@ } } - @include iro.bem-modifier('75') { - font-size: fn.dim(--75 --font-size); - - @include status(75); - - @include iro.bem-elem('content') { - width: fn.dim(--75 --size); - height: fn.dim(--75 --size); - line-height: fn.dim(--75 --size); - } - } - - @include iro.bem-modifier('50') { - font-size: fn.dim(--50 --font-size); - - @include status(50); - - @include iro.bem-elem('content') { - width: fn.dim(--50 --size); - height: fn.dim(--50 --size); - line-height: fn.dim(--50 --size); + @each $size in 50 75 150 { + @include iro.bem-modifier($size) { + font-size: fn.dim(--#{$size} --font-size); + + @include status($size); + + @include iro.bem-elem('content') { + width: fn.dim(--#{$size} --size); + height: fn.dim(--#{$size} --size); + line-height: fn.dim(--#{$size} --size); + } } } } diff --git a/src/objects/_icon.scss b/src/objects/_icon.scss index e613ec2..12baeba 100644 --- a/src/objects/_icon.scss +++ b/src/objects/_icon.scss @@ -1,11 +1,19 @@ @use 'iro-sass/src/index' as iro; +@use '../functions' as fn; @include iro.props-namespace('icon') { + @include iro.props-store(( + --dims: ( + --stroke: 1.5px, + --size: calc(1 / 14 * 16em), + ) + ), 'dims'); + @include iro.bem-object(iro.props-namespace()) { display: inline-block; - width: 1em; - height: 1em; - stroke-width: var(--icon-stroke-width, 1.5px); + width: fn.dim(--size); + height: fn.dim(--size); + stroke-width: fn.dim(--stroke); stroke-linecap: round; stroke-linejoin: round; vertical-align: -.12em; -- cgit v1.2.3-70-g09d2