@use 'iro-sass/src/index' as iro; @use '../functions' as fn; @include iro.props-namespace('bubble-group') { @include iro.props-store(( --dims: ( --spacing-x: fn.global-dim(--size --225), --spacing-y: fn.global-dim(--size --150), --compact: ( --spacing-x: fn.global-dim(--size --225), --spacing-y: fn.global-dim(--size --50), ) ) ), 'dims'); @include iro.bem-layout(iro.props-namespace()) { display: grid; grid-template-columns: auto 1fr; grid-auto-rows: auto; grid-template-areas: 'avatar bubble'; align-items: flex-start; gap: fn.dim(--spacing-y) fn.dim(--spacing-x); @include iro.bem-elem('avatar') { grid-area: avatar; } @include iro.bem-elem('bubble') { grid-column: bubble; min-width: 0; } @include iro.bem-modifier('compact') { gap: fn.dim(--compact --spacing-y) fn.dim(--compact --spacing-x); @include iro.bem-modifier('left') { justify-items: start; } @include iro.bem-modifier('right') { justify-items: end; } } @include iro.bem-modifier('right') { grid-template-columns: 1fr auto; grid-template-areas: 'bubble avatar'; } @include iro.bem-modifier('no-avatar') { grid-template-columns: 1fr; grid-template-areas: 'bubble'; @include iro.bem-elem('avatar') { display: none; } } @include iro.bem-modifier('arrow') { @include iro.bem-elem('avatar') { @include iro.bem-next-elem('bubble') { &::before { display: block; } } } @include iro.bem-modifier('right') { @include iro.bem-elem('avatar') { @include iro.bem-next-elem('bubble') { &::before { display: none; } &::after { display: block; } } } } } } }