blob: 26ba16f610d834073ef024e44d01db19fd1e5fa1 (
plain) (
blame)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
@use 'iro-sass/src/index' as iro;
@use 'include-media/dist/include-media' as media;
@use '../functions' as fn;
@include iro.props-namespace('container') {
@include iro.props-store((
--dims: (
--content-width: iro.fn-px-to-rem(700px),
--sm-content-width: iro.fn-px-to-rem(360px),
--pad-x: fn.global-dim(--size --700),
--pad-y: fn.global-dim(--size --700),
--in-page-spacing-y: fn.global-dim(--size --700),
)
), 'dims');
@include iro.bem-layout(iro.props-namespace()) {
overflow: hidden;
@include iro.bem-elem('inner') {
margin-top: calc(-1 * fn.global-dim(--size --700));
margin-bottom: calc(-1 * fn.global-dim(--size --700));
&::before,
&::after {
content: '';
display: block;
width: 0;
height: 0;
}
&::before {
margin-bottom: fn.global-dim(--size --700);
}
&::after {
margin-top: fn.global-dim(--size --700);
}
}
@include iro.bem-modifier('pad-x') {
padding-right: fn.dim(--pad-x);
padding-left: fn.dim(--pad-x);
}
@include iro.bem-modifier('pad-y') {
padding-top: fn.dim(--pad-y);
padding-bottom: fn.dim(--pad-y);
}
@include iro.bem-modifier('narrow') {
max-width: fn.dim(--content-width);
margin-right: auto;
margin-left: auto;
@each $breakpoint in map-keys(media.$breakpoints) {
@include media.media('<=#{$breakpoint}') {
@include iro.bem-suffix('#{$breakpoint}-down') {
max-width: fn.dim(--content-width);
margin-right: auto;
margin-left: auto;
}
}
}
}
@include iro.bem-modifier('sm-narrow') {
max-width: fn.dim(--sm-content-width);
margin-right: auto;
margin-left: auto;
@each $breakpoint in map-keys(media.$breakpoints) {
@include media.media('<=#{$breakpoint}') {
@include iro.bem-suffix('#{$breakpoint}-down') {
max-width: fn.dim(--sm-content-width);
margin-right: auto;
margin-left: auto;
}
}
}
}
@include iro.bem-modifier('in-page') {
margin-top: fn.dim(--in-page-spacing-y);
margin-bottom: fn.dim(--in-page-spacing-y);
}
}
}
|