diff options
Diffstat (limited to 'src/layouts')
| -rw-r--r-- | src/layouts/_card-list.scss | 28 | ||||
| -rw-r--r-- | src/layouts/_card-list.vars.scss | 17 |
2 files changed, 21 insertions, 24 deletions
diff --git a/src/layouts/_card-list.scss b/src/layouts/_card-list.scss index aedbfd0..6a6fe01 100644 --- a/src/layouts/_card-list.scss +++ b/src/layouts/_card-list.scss | |||
| @@ -78,31 +78,17 @@ | |||
| 78 | row-gap: props.get(vars.$quiet--row-gap); | 78 | row-gap: props.get(vars.$quiet--row-gap); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | @include bem.modifier('grid') { | ||
| 82 | display: grid; | ||
| 83 | grid-template-columns: repeat(auto-fill, minmax(props.get(vars.$grid--col-width), 1fr)); | ||
| 84 | gap: props.get(vars.$grid--row-gap) props.get(vars.$grid--col-gap); | ||
| 85 | 81 | ||
| 86 | @include bem.modifier('quiet') { | 82 | @each $mod, $row-gap, $col-gap, $col-width, $quiet--row-gap in vars.$grid-layouts { |
| 87 | row-gap: props.get(vars.$grid--quiet--row-gap); | 83 | @include bem.modifier($mod) { |
| 88 | } | 84 | display: grid; |
| 89 | } | 85 | grid-template-columns: repeat(auto-fill, minmax(props.get($col-width), 1fr)); |
| 90 | 86 | gap: props.get($row-gap) props.get($col-gap); | |
| 91 | @include bem.modifier('grid-sm') { | ||
| 92 | display: grid; | ||
| 93 | grid-template-columns: repeat(auto-fill, minmax(props.get(vars.$grid-sm--col-width), 1fr)); | ||
| 94 | gap: props.get(vars.$grid-sm--row-gap) props.get(vars.$grid-sm--col-gap); | ||
| 95 | 87 | ||
| 96 | @include bem.modifier('grid-sm') { | 88 | @include bem.modifier('quiet') { |
| 97 | @include media.media('<=md') { | 89 | row-gap: props.get($quiet--row-gap); |
| 98 | display: flex; | ||
| 99 | gap: props.get(vars.$row-gap); | ||
| 100 | } | 90 | } |
| 101 | } | 91 | } |
| 102 | |||
| 103 | @include bem.modifier('quiet') { | ||
| 104 | row-gap: props.get(vars.$grid-sm--quiet--row-gap); | ||
| 105 | } | ||
| 106 | } | 92 | } |
| 107 | 93 | ||
| 108 | @include bem.modifier('masonry') { | 94 | @include bem.modifier('masonry') { |
diff --git a/src/layouts/_card-list.vars.scss b/src/layouts/_card-list.vars.scss index 75e72cc..2215882 100644 --- a/src/layouts/_card-list.vars.scss +++ b/src/layouts/_card-list.vars.scss | |||
| @@ -14,11 +14,22 @@ $grid--col-gap: props.def(--l-card-list--grid--col-gap, props.get(core.$s | |||
| 14 | $grid--col-width: props.def(--l-card-list--grid--col-width, props.get(core.$size--3200)) !default; | 14 | $grid--col-width: props.def(--l-card-list--grid--col-width, props.get(core.$size--3200)) !default; |
| 15 | $grid--quiet--row-gap: props.def(--l-card-list--grid--quiet--row-gap, props.get(core.$size--800)) !default; | 15 | $grid--quiet--row-gap: props.def(--l-card-list--grid--quiet--row-gap, props.get(core.$size--800)) !default; |
| 16 | 16 | ||
| 17 | $grid-sm--row-gap: props.def(--l-card-list--grid-md--row-gap, props.get(core.$size--200)) !default; | 17 | $grid-sm--row-gap: props.def(--l-card-list--grid-sm--row-gap, props.get(core.$size--200)) !default; |
| 18 | $grid-sm--col-gap: props.def(--l-card-list--grid-md--col-gap, props.get(core.$size--200)) !default; | 18 | $grid-sm--col-gap: props.def(--l-card-list--grid-sm--col-gap, props.get(core.$size--200)) !default; |
| 19 | $grid-sm--col-width: props.def(--l-card-list--grid-md--col-width, props.get(core.$size--4600)) !default; | 19 | $grid-sm--col-width: props.def(--l-card-list--grid-sm--col-width, props.get(core.$size--4600)) !default; |
| 20 | $grid-sm--quiet--row-gap: props.def(--l-card-list--grid-sm--quiet--row-gap, props.get(core.$size--800)) !default; | 20 | $grid-sm--quiet--row-gap: props.def(--l-card-list--grid-sm--quiet--row-gap, props.get(core.$size--800)) !default; |
| 21 | 21 | ||
| 22 | $grid-xs--row-gap: props.def(--l-card-list--grid-xs--row-gap, props.get(core.$size--200)) !default; | ||
| 23 | $grid-xs--col-gap: props.def(--l-card-list--grid-xs--col-gap, props.get(core.$size--200)) !default; | ||
| 24 | $grid-xs--col-width: props.def(--l-card-list--grid-xs--col-width, props.get(core.$size--2400)) !default; | ||
| 25 | $grid-xs--quiet--row-gap: props.def(--l-card-list--grid-xs--quiet--row-gap, props.get(core.$size--800)) !default; | ||
| 26 | |||
| 27 | $grid-layouts: ( | ||
| 28 | 'grid': $grid--row-gap $grid--col-gap $grid--col-width $grid--quiet--row-gap, | ||
| 29 | 'grid-sm': $grid-sm--row-gap $grid-sm--col-gap $grid-sm--col-width $grid-sm--quiet--row-gap, | ||
| 30 | 'grid-xs': $grid-xs--row-gap $grid-xs--col-gap $grid-xs--col-width $grid-xs--quiet--row-gap, | ||
| 31 | ) !default; | ||
| 32 | |||
| 22 | $masonry--row-gap: props.def(--l-card-list--masonry--row-gap, props.get(core.$size--400)) !default; | 33 | $masonry--row-gap: props.def(--l-card-list--masonry--row-gap, props.get(core.$size--400)) !default; |
| 23 | $masonry--col-gap: props.def(--l-card-list--masonry--col-gap, props.get(core.$size--400)) !default; | 34 | $masonry--col-gap: props.def(--l-card-list--masonry--col-gap, props.get(core.$size--400)) !default; |
| 24 | $masonry--col-width: props.def(--l-card-list--masonry--col-width, props.get(core.$size--3200)) !default; | 35 | $masonry--col-width: props.def(--l-card-list--masonry--col-width, props.get(core.$size--3200)) !default; |
