1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
@use 'iro-sass/src/index' as iro;
@use 'iro-design/src/functions' as fn;
@include iro.props-namespace('card-list') {
@include iro.props-store((
--dims: (
--margin-top: fn.global-dim(--size --600),
--spacing: fn.global-dim(--size --200),
--gap: fn.global-dim(--size --25),
--grid: (
--gap: fn.global-dim(--size --75),
--col-width: fn.global-dim(--size --3400),
),
--small-gallery: (
--gap: fn.global-dim(--size --250),
--col-width: fn.global-dim(--size --2800),
),
--gallery: (
--gap: fn.global-dim(--size --250),
--col-width: fn.global-dim(--size --3400),
)
)
), 'dims');
@include iro.bem-layout(iro.props-namespace()) {
margin-top: fn.dim(--margin-top);
font-size: 1rem;
@include iro.bem-elem('header') {
margin-top: fn.dim(--margin-top);
}
@include iro.bem-elem('cards') {
display: flex;
flex-direction: column;
gap: fn.dim(--gap);
margin-top: fn.dim(--spacing);
@each $mode in 'grid' 'small-gallery' 'gallery' {
@include iro.bem-modifier($mode) {
display: grid;
align-items: start;
grid-template-columns: repeat(auto-fill, minmax(fn.dim('--#{$mode}' --col-width), 1fr));
gap: fn.dim('--#{$mode}' --gap);
}
}
}
}
}
|