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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;
@include iro.props-namespace('rule') {
@include iro.props-store((
--dims: (
--margin-y: fn.global-dim(--size --85),
--strong: (
--border-width: fn.global-dim(--border-width --thick),
--label-font-size: fn.global-dim(--font-size --100),
),
--medium: (
--border-width: fn.global-dim(--border-width --medium),
--label-font-size: fn.global-dim(--font-size --75),
),
--faint: (
--border-width: fn.global-dim(--border-width --thin),
--label-font-size: fn.global-dim(--font-size --50),
),
),
), 'dims');
@include iro.props-store((
--colors: (
--strong: (
--bg: fn.global-color(--fg),
--label: fn.global-color(--fg),
),
--medium: (
--bg: fn.global-color(--obj),
--label: fn.global-color(--fg-hi),
),
--faint: (
--bg: fn.global-color(--obj),
--label: fn.global-color(--fg-hi2),
),
),
), 'colors');
@include iro.bem-object(iro.props-namespace()) {
display: block;
height: fn.dim(--strong --border-width);
margin-top: fn.dim(--margin-y);
margin-bottom: fn.dim(--margin-y);
background-color: fn.color(--strong --bg);
@include iro.bem-modifier('vertical') {
width: 1px;
height: auto;
margin-top: 0;
margin-bottom: 0;
background-color: fn.color(--faint --bg);
}
@include iro.bem-modifier('medium') {
height: fn.dim(--medium --border-width);
background-color: fn.color(--medium --bg);
}
@include iro.bem-modifier('faint') {
height: fn.dim(--faint --border-width);
background-color: fn.color(--faint --bg);
}
@include iro.bem-modifier('labelled') {
display: flex;
flex-direction: row;
align-items: center;
height: auto;
border-radius: 0;
background-color: transparent;
&::before,
&::after {
content: '';
display: block;
flex: 1 1 auto;
width: 100%;
height: 3px;
background-color: fn.color(--strong --bg);
}
&::before {
margin-right: 1em;
}
&::after {
margin-left: 1em;
}
@include iro.bem-elem('label') {
flex: 0 0 auto;
color: fn.color(--strong --label);
font-size: fn.dim(--strong --label-font-size);
font-weight: 700;
letter-spacing: .5px;
text-transform: uppercase;
}
@include iro.bem-modifier('medium') {
&::before,
&::after {
height: 2px;
background-color: fn.color(--medium --bg);
}
@include iro.bem-elem('label') {
color: fn.color(--medium --label);
font-size: fn.dim(--medium --label-font-size);
font-weight: 500;
}
}
@include iro.bem-modifier('faint') {
&::before,
&::after {
height: 1px;
background-color: fn.color(--faint --bg);
}
@include iro.bem-elem('label') {
color: fn.color(--faint --label);
font-size: fn.dim(--faint --label-font-size);
font-weight: 500;
}
}
}
}
}
|