-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.less
251 lines (198 loc) · 8.2 KB
/
index.less
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
@bl-customComponent-simple-modal-themeColor: @themePrimary;
@bl-customComponent-simple-modal-backgroundColor: @appBackgroundColor;
@bl-customComponent-simple-modal-textColor: @appTextColor;
@bl-customComponent-simple-modal-font-family: inherit;
@bl-customComponent-simple-modal-max-width: 600px;
@bl-customComponent-simple-modal-min-width: 300px;
@bl-customComponent-simple-modal-z-index: 1000;
@bl-customComponent-simple-modal-open-animation: modal-open linear forwards;
@bl-customComponent-simple-modal-close-animation: modal-close linear forwards;
@bl-customComponent-simple-modal-content-padding: 16px 20px 8px;
@bl-customComponent-simple-modal-content-border-radius: 3px;
@bl-customComponent-simple-modal-title-margin: 0;
@bl-customComponent-simple-modal-title-padding: 0 0 16px;
@bl-customComponent-simple-modal-title-font-size: 1.25rem;
@bl-customComponent-simple-modal-title-font-weight: 500;
@bl-customComponent-simple-modal-text-margin: 0;
@bl-customComponent-simple-modal-text-font-size: 1rem;
@bl-customComponent-simple-modal-text-font-weight: 400;
@bl-customComponent-simple-modal-text-opacity: 0.6;
@bl-customComponent-simple-modal-buttonColor: @bl-customComponent-simple-modal-themeColor;
@bl-customComponent-simple-modal-button-backgroundColor: transparent;
@bl-customComponent-simple-modal-button-backgroundColorHover: fade(@bl-customComponent-simple-modal-themeColor, 4%);
@bl-customComponent-simple-modal-button-borderRadius: 4px;
@bl-customComponent-simple-modal-button-margin: 0;
@bl-customComponent-simple-modal-button-border: 0;
@bl-customComponent-simple-modal-button-outline: 0;
@bl-customComponent-simple-modal-button-padding: 6px 8px;
@bl-customComponent-simple-modal-button-font-size: 0.875rem;
@bl-customComponent-simple-modal-button-font-weight: 500;
@bl-customComponent-simple-modal-button-text-transform: uppercase;
@bl-customComponent-simple-modal-button-transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
@bl-customComponent-simple-modal-input-background-color: transparent;
@bl-customComponent-simple-modal-input-border-bottom: 1px solid gray;
@bl-customComponent-simple-modal-input-border-bottom-focus: 2px solid @bl-customComponent-simple-modal-themeColor;
@bl-customComponent-simple-modal-input-border-width-hover: 3px;
@bl-customComponent-simple-modal-input-border-bottom-transition: 0.3s;
@bl-customComponent-simple-modal-input-font-size: 1.25rem;
@bl-customComponent-simple-modal-input-font-weight: 400;
@bl-customComponent-simple-modal-placeholder-color: gray;
@bl-customComponent-simple-modal-placeholder-font-size: 1rem;
@bl-customComponent-simple-modal-placeholder-font-weight: 400;
@bl-customComponent-simple-modal-placeholder-transition: 0.3s;
@bl-customComponent-simple-modal-placeholder-input-focused-font-size: 0.8rem;
body.active-modal {
overflow-y: hidden;
}
.bl-customComponent-simple-modal {
z-index: @bl-customComponent-simple-modal-z-index;
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
}
.simple-modal {
&__content {
display: flex;
flex-direction: column;
position: fixed;
top: 40%;
left: 50%;
max-width: @bl-customComponent-simple-modal-max-width;
min-width: @bl-customComponent-simple-modal-min-width;
padding: @bl-customComponent-simple-modal-content-padding;
transform: translate(-50%, -50%);
background: @bl-customComponent-simple-modal-backgroundColor;
border-radius: @bl-customComponent-simple-modal-content-border-radius;
}
&__title {
margin: @bl-customComponent-simple-modal-title-margin;
padding: @bl-customComponent-simple-modal-title-padding;
font-family: @bl-customComponent-simple-modal-font-family;
font-weight: @bl-customComponent-simple-modal-title-font-weight;
font-size: @bl-customComponent-simple-modal-title-font-size;
line-height: 1.6;
letter-spacing: 0.0075em;
color: @bl-customComponent-simple-modal-textColor
}
&__container {
padding-bottom: 24px;
}
&__text {
margin: @bl-customComponent-simple-modal-text-margin;
font-family: @bl-customComponent-simple-modal-font-family;
font-weight: @bl-customComponent-simple-modal-text-font-weight;
font-size: @bl-customComponent-simple-modal-text-font-size;
line-height: 1.5;
letter-spacing: 0.00938em;
color: @bl-customComponent-simple-modal-textColor;
opacity: @bl-customComponent-simple-modal-text-opacity;
}
&__button-container {
display: flex;
justify-content: flex-end;
}
&__button {
outline: @bl-customComponent-simple-modal-button-outline;
border: @bl-customComponent-simple-modal-button-border;
margin: @bl-customComponent-simple-modal-button-margin;
padding: @bl-customComponent-simple-modal-button-padding;
cursor: pointer;
font-family: @bl-customComponent-simple-modal-font-family;
font-weight: @bl-customComponent-simple-modal-button-font-weight;
font-size: @bl-customComponent-simple-modal-button-font-size;
color: @bl-customComponent-simple-modal-buttonColor;
line-height: 1.75;
letter-spacing: 0.02857em;
text-transform: @bl-customComponent-simple-modal-button-text-transform;
background-color: @bl-customComponent-simple-modal-button-backgroundColor;
border-radius: @bl-customComponent-simple-modal-button-borderRadius;
transition: @bl-customComponent-simple-modal-button-transition;
&:hover {
text-decoration: none;
background-color: @bl-customComponent-simple-modal-button-backgroundColorHover;
}
}
&__input-form {
.form-input {
position: relative;
width: 100%;
margin-top: calc(@bl-customComponent-simple-modal-input-font-size + 8px);
&__input {
width: 100%;
height: @bl-customComponent-simple-modal-input-font-size;
font-family: @bl-customComponent-simple-modal-font-family;
font-size: @bl-customComponent-simple-modal-input-font-size;
font-weight: @bl-customComponent-simple-modal-input-font-weight;
color: @bl-customComponent-simple-modal-textColor;
padding: 0;
border: 0;
outline: none;
border-bottom: @bl-customComponent-simple-modal-input-border-bottom;
background-color: @bl-customComponent-simple-modal-input-background-color;
transition: @bl-customComponent-simple-modal-input-border-bottom-transition;
&::placeholder {
opacity: 0;
}
&:focus {
border-bottom: @bl-customComponent-simple-modal-input-border-bottom-focus;
}
&:hover {
border-width: @bl-customComponent-simple-modal-input-border-width-hover;
}
}
&__placeholder {
position: absolute;
left: 0;
top: 50%;
font-family: @bl-customComponent-simple-modal-font-family;
font-size: @bl-customComponent-simple-modal-placeholder-font-size;
font-weight: @bl-customComponent-simple-modal-placeholder-font-weight;
line-height: 1.4375em;
letter-spacing: 0.00938em;
color: @bl-customComponent-simple-modal-placeholder-color;
user-select: none;
z-index: -1;
transition: @bl-customComponent-simple-modal-placeholder-transition;
transform: translateY(-50%);
}
&__input:focus + .form-input__placeholder {
color: @bl-customComponent-simple-modal-themeColor;
}
&__input:focus + .form-input__placeholder,
&__input:not(:placeholder-shown) + .form-input__placeholder {
top: 0;
font-size: @bl-customComponent-simple-modal-placeholder-input-focused-font-size;
transform: translateY(-130%);
}
}
}
}
.open-modal {
animation: @bl-customComponent-simple-modal-open-animation;
}
@keyframes modal-open {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.close-modal {
animation: @bl-customComponent-simple-modal-close-animation;
}
@keyframes modal-close {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
}