From 6376f1a5225b2fa45f6c861d4a265bf13b56d038 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 29 Jun 2024 10:01:02 +0200 Subject: Update --- src/layouts/_card-list.scss | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'src/layouts/_card-list.scss') diff --git a/src/layouts/_card-list.scss b/src/layouts/_card-list.scss index c27b297..362325a 100644 --- a/src/layouts/_card-list.scss +++ b/src/layouts/_card-list.scss @@ -37,7 +37,11 @@ @include iro.bem-modifier('grid') { display: grid; grid-template-columns: repeat(auto-fill, minmax(fn.dim(--grid --col-width), 1fr)); - gap: fn.dim(--grid --row-gap) fn.dim(--grid --col-gap); + gap: fn.dim(--grid --col-gap); + + @include iro.bem-modifier('quiet') { + row-gap: fn.dim(--grid --row-gap); + } } @include iro.bem-modifier('masonry') { @@ -46,31 +50,45 @@ column-gap: fn.dim(--masonry --col-gap); @include iro.bem-elem('card') { - margin-bottom: fn.dim(--masonry --row-gap); + margin-bottom: fn.dim(--masonry --col-gap); + break-inside: avoid; + } + + @include iro.bem-modifier('quiet') { + @include iro.bem-elem('card') { + margin-bottom: fn.dim(--masonry --row-gap); + } } } @include iro.bem-modifier('masonry-h') { flex-flow: row wrap; - gap: fn.dim(--masonry-h --row-gap) fn.dim(--masonry-h --col-gap); + gap: fn.dim(--masonry-h --col-gap); + + &::after { + content: ''; + display: block; + flex: 1 0 auto; + inline-size: fn.dim(--masonry-h --row-height); + block-size: 0; + } @include iro.bem-elem('card') { - flex: 1 0 auto; - max-width: 100%; + flex: 1 0 auto; + max-inline-size: 100%; } - @include iro.bem-elem('card-content') { - height: fn.dim(--masonry-h --row-height); + @include iro.bem-elem('card-image') { + block-size: fn.dim(--masonry-h --row-height); } - @include iro.bem-elem('dummy') { - flex: 1 0 auto; - width: fn.dim(--masonry-h --row-height); + @include iro.bem-modifier('quiet') { + row-gap: fn.dim(--masonry-h --row-gap); } } @include iro.bem-modifier('aspect-5\\/4') { - @include iro.bem-elem('card') { + @include iro.bem-elem('card-image') { aspect-ratio: 5 / 4; } } -- cgit v1.2.3-70-g09d2