blob: 7f13a8b2c7e21ab0fb474ed67ff4ec08db3e1125 (
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
88
89
90
91
92
|
@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: 3rem,
--pad-y: 3rem,
--in-page-spacing-y: fn.global-dim(--spacing --y --xl),
)
), 'dims');
@include iro.bem-layout(iro.props-namespace()) {
overflow: hidden;
@include iro.bem-elem('inner') {
margin-top: calc(-1 * fn.global-dim(--spacing --y --xl));
margin-bottom: calc(-1 * fn.global-dim(--spacing --y --xl));
&::before,
&::after {
content: '';
display: block;
width: 0;
height: 0;
}
&::before {
margin-bottom: fn.global-dim(--spacing --y --xl);
}
&::after {
margin-top: fn.global-dim(--spacing --y --xl);
}
}
@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('themed') {
background-color: fn.global-color(--bg);
color: fn.global-color(--fg);
}
@include iro.bem-modifier('in-page') {
margin-top: fn.dim(--in-page-spacing-y);
margin-bottom: fn.dim(--in-page-spacing-y);
}
}
}
|