@use 'sass:meta'; @use 'include-media/dist/include-media' as media; @use 'iro-sass/src/bem'; @use 'iro-sass/src/props'; @use '../props' as *; @forward 'card-list.vars'; @use 'card-list.vars' as vars; @mixin styles { @include materialize-at-root(meta.module-variables('vars')); @include bem.layout('card-list') { display: flex; flex-direction: column; gap: props.get(vars.$row-gap); @include bem.modifier('quiet') { row-gap: props.get(vars.$quiet--row-gap); } @include bem.modifier('grid') { display: grid; grid-template-columns: repeat(auto-fill, minmax(props.get(vars.$grid--col-width), 1fr)); gap: props.get(vars.$grid--row-gap) props.get(vars.$grid--col-gap); @include bem.modifier('quiet') { row-gap: props.get(vars.$grid--quiet--row-gap); } } @include bem.modifier('masonry') { display: block; columns: auto props.get(vars.$masonry--col-width); column-gap: props.get(vars.$masonry--col-gap); @include bem.elem('card') { margin-block-end: props.get(vars.$masonry--row-gap); break-inside: avoid; } @include bem.modifier('quiet') { @include bem.elem('card') { margin-block-end: props.get(vars.$masonry--quiet--row-gap); } } } @include bem.modifier('masonry-h') { flex-flow: row wrap; gap: props.get(vars.$masonry-h--row-gap) props.get(vars.$masonry-h--col-gap); @include bem.modifier('no-flush') { &::after { display: block; flex: 1 0 auto; inline-size: props.get(vars.$masonry-h--row-height); content: ''; } } @include bem.elem('card') { flex: 1 0 auto; max-inline-size: 100%; } @include bem.elem('card-image') { block-size: props.get(vars.$masonry-h--row-height); } @include bem.modifier('quiet') { row-gap: props.get(vars.$masonry-h--quiet--row-gap); } } @include bem.modifier('aspect-5\\/4') { @include bem.elem('card-image') { aspect-ratio: 5 / 4; } } } }