diff options
| author | Volpeon <git@volpeon.ink> | 2026-06-04 12:07:39 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2026-06-04 12:07:39 +0200 |
| commit | 841554eb03d652ed3c70a6d46e8b5f57300ee707 (patch) | |
| tree | c3ea0b559c948784b9f448f565cbd4215ab8ac3d /src | |
| parent | o-button: Add justify mod (diff) | |
| download | iro-design-841554eb03d652ed3c70a6d46e8b5f57300ee707.tar.gz iro-design-841554eb03d652ed3c70a6d46e8b5f57300ee707.tar.bz2 iro-design-841554eb03d652ed3c70a6d46e8b5f57300ee707.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/layouts/_card-list.scss | 26 | ||||
| -rw-r--r-- | src/layouts/_card-list.vars.scss | 6 |
2 files changed, 31 insertions, 1 deletions
diff --git a/src/layouts/_card-list.scss b/src/layouts/_card-list.scss index 8f96ce0..8f03c09 100644 --- a/src/layouts/_card-list.scss +++ b/src/layouts/_card-list.scss | |||
| @@ -133,7 +133,6 @@ | |||
| 133 | row-gap: props.get(vars.$quiet--row-gap); | 133 | row-gap: props.get(vars.$quiet--row-gap); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | |||
| 137 | @each $mod, $row-gap, $col-gap, $col-width, $quiet--row-gap, $breakpoint in vars.$grid-layouts { | 136 | @each $mod, $row-gap, $col-gap, $col-width, $quiet--row-gap, $breakpoint in vars.$grid-layouts { |
| 138 | @include bem.modifier($mod) { | 137 | @include bem.modifier($mod) { |
| 139 | display: grid; | 138 | display: grid; |
| @@ -150,6 +149,31 @@ | |||
| 150 | } | 149 | } |
| 151 | } | 150 | } |
| 152 | 151 | ||
| 152 | @each $mod, $row-gap, $col-gap, $col-width, $quiet--row-gap, $breakpoint in vars.$flex-layouts { | ||
| 153 | @include bem.modifier($mod) { | ||
| 154 | display: flex; | ||
| 155 | flex-flow: row wrap; | ||
| 156 | gap: props.get($row-gap) props.get($col-gap); | ||
| 157 | |||
| 158 | @include bem.modifier('quiet') { | ||
| 159 | row-gap: props.get($quiet--row-gap); | ||
| 160 | } | ||
| 161 | |||
| 162 | @include bem.elem('card') { | ||
| 163 | flex: 0.1 0 auto; | ||
| 164 | inline-size: props.get($col-width); | ||
| 165 | } | ||
| 166 | |||
| 167 | @include media.media('<=#{$breakpoint}') { | ||
| 168 | flex-flow: column nowrap; | ||
| 169 | |||
| 170 | @include bem.elem('card') { | ||
| 171 | inline-size: auto; | ||
| 172 | } | ||
| 173 | } | ||
| 174 | } | ||
| 175 | } | ||
| 176 | |||
| 153 | @include bem.modifier('masonry') { | 177 | @include bem.modifier('masonry') { |
| 154 | display: block; | 178 | display: block; |
| 155 | columns: auto props.get(vars.$masonry--col-width); | 179 | columns: auto props.get(vars.$masonry--col-width); |
diff --git a/src/layouts/_card-list.vars.scss b/src/layouts/_card-list.vars.scss index d860ec9..ae57744 100644 --- a/src/layouts/_card-list.vars.scss +++ b/src/layouts/_card-list.vars.scss | |||
| @@ -26,6 +26,12 @@ $grid-layouts: ( | |||
| 26 | 'grid-xs' $grid-xs--row-gap $grid-xs--col-gap $grid-xs--col-width $grid-xs--quiet--row-gap xs, | 26 | 'grid-xs' $grid-xs--row-gap $grid-xs--col-gap $grid-xs--col-width $grid-xs--quiet--row-gap xs, |
| 27 | ) !default; | 27 | ) !default; |
| 28 | 28 | ||
| 29 | $flex-layouts: ( | ||
| 30 | 'flex' $grid--row-gap $grid--col-gap $grid--col-width $grid--quiet--row-gap sm, | ||
| 31 | 'flex-sm' $grid-sm--row-gap $grid-sm--col-gap $grid-sm--col-width $grid-sm--quiet--row-gap sm, | ||
| 32 | 'flex-xs' $grid-xs--row-gap $grid-xs--col-gap $grid-xs--col-width $grid-xs--quiet--row-gap xs, | ||
| 33 | ) !default; | ||
| 34 | |||
| 29 | $masonry--row-gap: props.def(--l-card-list--masonry--row-gap, props.get(core.$size--400)) !default; | 35 | $masonry--row-gap: props.def(--l-card-list--masonry--row-gap, props.get(core.$size--400)) !default; |
| 30 | $masonry--col-gap: props.def(--l-card-list--masonry--col-gap, props.get(core.$size--400)) !default; | 36 | $masonry--col-gap: props.def(--l-card-list--masonry--col-gap, props.get(core.$size--400)) !default; |
| 31 | $masonry--col-width: props.def(--l-card-list--masonry--col-width, props.get(core.$size--3200)) !default; | 37 | $masonry--col-width: props.def(--l-card-list--masonry--col-width, props.get(core.$size--3200)) !default; |
