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
|
@use 'iro-sass/src/index' as iro;
@use '../functions' as fn;
@include iro.props-namespace('rule') {
@include iro.props-store((
--dims: (
--margin-y: fn.dim(--spacing --y --xs, $global: true),
--strong: (
--border-width: fn.dim(--border-width --thick, $global: true),
--label-font-size: fn.dim(--font-size --md, $global: true),
),
--medium: (
--border-width: fn.dim(--border-width --medium, $global: true),
--label-font-size: fn.dim(--font-size --sm, $global: true),
),
--faint: (
--border-width: fn.dim(--border-width --thin, $global: true),
--label-font-size: fn.dim(--font-size --xs, $global: true),
),
),
), 'dims');
@include iro.props-store((
--colors: (
--strong: (
--bg: fn.color(--fg, $global: true),
--label: fn.color(--fg, $global: true),
),
--medium: (
--bg: fn.color(--obj, $global: true),
--label: fn.color(--fg-hi, $global: true),
),
--faint: (
--bg: fn.color(--obj, $global: true),
--label: fn.color(--fg-hi2, $global: true),
),
),
), '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('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;
}
}
}
}
}
|