diff options
Diffstat (limited to 'src/layouts')
-rw-r--r-- | src/layouts/_card-list.scss | 45 | ||||
-rw-r--r-- | src/layouts/_card-list.vars.scss | 7 |
2 files changed, 51 insertions, 1 deletions
diff --git a/src/layouts/_card-list.scss b/src/layouts/_card-list.scss index 8ef40c5..b828e44 100644 --- a/src/layouts/_card-list.scss +++ b/src/layouts/_card-list.scss | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | @forward 'card-list.vars'; | 7 | @forward 'card-list.vars'; |
8 | @use 'card-list.vars' as vars; | 8 | @use 'card-list.vars' as vars; |
9 | @use '../objects/card.vars' as card; | ||
9 | 10 | ||
10 | @mixin styles { | 11 | @mixin styles { |
11 | @include materialize-at-root(meta.module-variables('vars')); | 12 | @include materialize-at-root(meta.module-variables('vars')); |
@@ -15,6 +16,33 @@ | |||
15 | flex-direction: column; | 16 | flex-direction: column; |
16 | gap: props.get(vars.$row-gap); | 17 | gap: props.get(vars.$row-gap); |
17 | 18 | ||
19 | @include bem.modifier('merge') { | ||
20 | position: relative; | ||
21 | gap: 0; | ||
22 | |||
23 | @include bem.elem('card') { | ||
24 | transition: none; | ||
25 | |||
26 | &:not(:last-child) { | ||
27 | margin-bottom: calc(-1 * props.get(card.$border-width)); | ||
28 | border-end-start-radius: 0; | ||
29 | border-end-end-radius: 0; | ||
30 | } | ||
31 | |||
32 | &:hover, | ||
33 | &:active, | ||
34 | &:focus-visible { | ||
35 | z-index: 10; | ||
36 | transform: none; | ||
37 | } | ||
38 | |||
39 | @include bem.next-twin-elem { | ||
40 | border-start-start-radius: 0; | ||
41 | border-start-end-radius: 0; | ||
42 | } | ||
43 | } | ||
44 | } | ||
45 | |||
18 | @include bem.modifier('quiet') { | 46 | @include bem.modifier('quiet') { |
19 | row-gap: props.get(vars.$quiet--row-gap); | 47 | row-gap: props.get(vars.$quiet--row-gap); |
20 | } | 48 | } |
@@ -29,6 +57,23 @@ | |||
29 | } | 57 | } |
30 | } | 58 | } |
31 | 59 | ||
60 | @include bem.modifier('grid-sm') { | ||
61 | display: grid; | ||
62 | grid-template-columns: repeat(auto-fill, minmax(props.get(vars.$grid-sm--col-width), 1fr)); | ||
63 | gap: props.get(vars.$grid-sm--row-gap) props.get(vars.$grid-sm--col-gap); | ||
64 | |||
65 | @include bem.modifier("grid-sm") { | ||
66 | @include media.media("<=md") { | ||
67 | display: flex; | ||
68 | gap: props.get(vars.$row-gap); | ||
69 | } | ||
70 | } | ||
71 | |||
72 | @include bem.modifier('quiet') { | ||
73 | row-gap: props.get(vars.$grid-sm--quiet--row-gap); | ||
74 | } | ||
75 | } | ||
76 | |||
32 | @include bem.modifier('masonry') { | 77 | @include bem.modifier('masonry') { |
33 | display: block; | 78 | display: block; |
34 | columns: auto props.get(vars.$masonry--col-width); | 79 | 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 f77bfbf..1c49c0f 100644 --- a/src/layouts/_card-list.vars.scss +++ b/src/layouts/_card-list.vars.scss | |||
@@ -1,7 +1,7 @@ | |||
1 | @use 'iro-sass/src/props'; | 1 | @use 'iro-sass/src/props'; |
2 | @use '../core.vars' as core; | 2 | @use '../core.vars' as core; |
3 | 3 | ||
4 | $row-gap: props.def(--l-card-list--row-gap, props.get(core.$size--200)) !default; | 4 | $row-gap: props.def(--l-card-list--row-gap, props.get(core.$size--100)) !default; |
5 | $quiet--row-gap: props.def(--l-card-list--quiet--row-gap, props.get(core.$size--800)) !default; | 5 | $quiet--row-gap: props.def(--l-card-list--quiet--row-gap, props.get(core.$size--800)) !default; |
6 | 6 | ||
7 | $grid--row-gap: props.def(--l-card-list--grid--row-gap, props.get(core.$size--400)) !default; | 7 | $grid--row-gap: props.def(--l-card-list--grid--row-gap, props.get(core.$size--400)) !default; |
@@ -9,6 +9,11 @@ $grid--col-gap: props.def(--l-card-list--grid--col-gap, props.get(core.$s | |||
9 | $grid--col-width: props.def(--l-card-list--grid--col-width, props.get(core.$size--3200)) !default; | 9 | $grid--col-width: props.def(--l-card-list--grid--col-width, props.get(core.$size--3200)) !default; |
10 | $grid--quiet--row-gap: props.def(--l-card-list--grid--quiet--row-gap, props.get(core.$size--800)) !default; | 10 | $grid--quiet--row-gap: props.def(--l-card-list--grid--quiet--row-gap, props.get(core.$size--800)) !default; |
11 | 11 | ||
12 | $grid-sm--row-gap: props.def(--l-card-list--grid-md--row-gap, props.get(core.$size--150)) !default; | ||
13 | $grid-sm--col-gap: props.def(--l-card-list--grid-md--col-gap, props.get(core.$size--150)) !default; | ||
14 | $grid-sm--col-width: props.def(--l-card-list--grid-md--col-width, props.get(core.$size--4600)) !default; | ||
15 | $grid-sm--quiet--row-gap: props.def(--l-card-list--grid-sm--quiet--row-gap, props.get(core.$size--800)) !default; | ||
16 | |||
12 | $masonry--row-gap: props.def(--l-card-list--masonry--row-gap, props.get(core.$size--400)) !default; | 17 | $masonry--row-gap: props.def(--l-card-list--masonry--row-gap, props.get(core.$size--400)) !default; |
13 | $masonry--col-gap: props.def(--l-card-list--masonry--col-gap, props.get(core.$size--400)) !default; | 18 | $masonry--col-gap: props.def(--l-card-list--masonry--col-gap, props.get(core.$size--400)) !default; |
14 | $masonry--col-width: props.def(--l-card-list--masonry--col-width, props.get(core.$size--3200)) !default; | 19 | $masonry--col-width: props.def(--l-card-list--masonry--col-width, props.get(core.$size--3200)) !default; |