@use 'sass:meta'; @use 'iro-sass/src/iro-sass' as iro; @use 'iro-sass/src/props'; @use '../props' as *; @use 'avatar.vars' as avatar; @forward 'card.vars'; @use 'card.vars' as vars; @mixin styles { @include materialize-at-root(meta.module-variables('vars')); @include iro.bem-object('card') { display: block; margin: calc(-1 * props.get(vars.$key-focus--border-width)); background-color: props.get(vars.$bg-color); background-clip: content-box; border: props.get(vars.$key-focus--border-offset) solid transparent; border-radius: calc(props.get(vars.$rounding) + props.get(vars.$key-focus--border-offset)); transition: transform .2s; @include iro.bem-multi('&:link, &:visited, &:enabled', 'modifier' 'interactive') { &:hover, &:active, &:focus-visible { transform: translateY(props.get(vars.$hover--offset-b)); } &:focus-visible { outline: props.get(vars.$key-focus--border-color) solid props.get(vars.$key-focus--border-width); box-shadow: 0 0 0 calc(props.get(vars.$key-focus--border-width) + props.get(vars.$key-focus--outline-width)) props.get(vars.$key-focus--outline-color); } } @include iro.bem-elem('avatar') { margin-block-start: props.get(vars.$pad-b); margin-inline-start: props.get(vars.$pad-i); } @include iro.bem-elem('image') { display: block; inline-size: 100%; object-fit: cover; transition: transform .2s, opacity .2s; &:first-child { border-start-start-radius: props.get(vars.$rounding); border-start-end-radius: props.get(vars.$rounding); } &:last-child { border-end-start-radius: props.get(vars.$rounding); border-end-end-radius: props.get(vars.$rounding); } @include iro.bem-next-elem('avatar') { margin-block-start: calc(-.7 * props.get(avatar.$size--xl)); } } @include iro.bem-elem('body') { padding-block: props.get(vars.$pad-b); padding-inline: props.get(vars.$pad-i); &::before { display: block; margin-block: -100em 100em; content: ''; } } @include iro.bem-elem('content') { margin-block-start: props.get(vars.$spacing); } @include iro.bem-elem('footer') { padding-block: 0 props.get(vars.$pad-b); padding-inline: props.get(vars.$pad-i); margin-block-start: calc(-1 * props.get(vars.$pad-b)); &::before { display: block; block-size: props.get(vars.$divider-width); margin-block: props.get(vars.$spacing); content: ''; background-color: props.get(vars.$divider-width); } } @include iro.bem-modifier('quiet') { position: relative; background-color: transparent; border: 0; @include iro.bem-multi('&:link, &:visited, &:enabled', 'modifier' 'interactive') { &:hover, &:active, &:focus-visible { transform: none; @include iro.bem-elem('image') { background-color: props.get(vars.$quiet--hover--image-color); opacity: .75; transform: translateY(props.get(vars.$hover--offset-b)); } } &:focus-visible { outline: none; box-shadow: none; @include iro.bem-elem('image') { background-color: props.get(vars.$quiet--hover--image-color); outline: props.get(vars.$key-focus--border-color) solid props.get(vars.$key-focus--border-width); box-shadow: 0 0 0 calc(props.get(vars.$key-focus--border-width) + props.get(vars.$key-focus--outline-width)) props.get(vars.$key-focus--outline-color); opacity: 1; } } } @include iro.bem-elem('image') { position: relative; margin: calc(-1 * props.get(vars.$key-focus--border-width)); background-color: props.get(vars.$quiet--image-color); background-clip: padding-box; border: props.get(vars.$key-focus--border-offset) solid transparent; border-radius: calc(props.get(vars.$rounding) + props.get(vars.$key-focus--border-offset)); } @include iro.bem-elem('body') { padding: 0; padding-block-start: props.get(vars.$spacing); } @include iro.bem-elem('footer') { padding-inline: 0; } } } }