-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
391 lines (329 loc) · 6.3 KB
/
style.css
File metadata and controls
391 lines (329 loc) · 6.3 KB
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
:root {
/* colors */
--brand-8: #484DE8;
--brand-9: #383EEF;
--dark-0: #141414;
--dark-1: #1A1A1A;
--dark-2: #202020;
--dark-3: #2D2D2D;
--dark-4: #373737;
--dark-5: #404040;
--dark-6: #4C4C4C;
--dark-7: #575757;
--dark-8: #6E6E6E;
--dark-9: #848484;
--gray-0: #F8F9FA;
--gray-1: #F1F3F5;
--gray-2: #E9ECEF;
--gray-3: #DEE2E6;
--gray-4: #CED4DA;
--gray-5: #CED4DA;
--gray-6: #868E96;
--gray-7: #495057;
--gray-8: #343A40;
--gray-9: #212529;
--white: #FFFFFF;
/* paddings */
--container-padding-inline: 20px;
}
* {
/* remove browser default margin & padding */
margin: 0;
padding: 0;
/* it's better for modern layouts */
box-sizing: border-box;
/* default color text */
color: var(--white);
/* remove text decoration for links */
text-decoration: none;
list-style: none;
}
body {
/* define the default font */
font-family: "Inter", sans-serif;
font-weight: 400;
background-color: var(--dark-0);
}
html {
/*
define rem size in px
when you will develop styles for other devices
you can just change this value using @media rule
and all font sizes will change on all website
*/
font-size: 12px;
}
.container {
width: 100%;
padding-inline: var(--container-padding-inline);
margin: 0 auto;
}
h1,
h2,
h3 {
font-weight: 700;
}
h1 {
font-size: 3.333rem;
}
h2 {
font-size: 2.167rem;
}
a.link {
text-decoration: underline;
font-size: 1.167rem;
}
a.link:hover {
text-decoration: underline;
}
a.link:visited {
/* tip: you can define your variable like purple-9 */
color: purple;
}
/* button */
.btn {
/* to reduce problems when we use <a> tag */
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
width: fit-content;
padding: 0.667rem 1rem;
background: var(--brand-9);
border: 1px solid var(--brand-9);
border-radius: 8px;
transition: 0.3s ease-out;
/* button's text styles */
color: var(--white);
font-weight: 500;
cursor: pointer;
}
/* to not have hover on touch screen devices */
@media (hover: hover) {
.btn:hover {
/* to make activation (click) effect faster */
transition: 0.1s ease-out;
background: var(--brand-8);
border: 1px solid var(--brand-8);
}
}
.btn:active {
background: var(--brand-9);
border: 1px solid var(--brand-9);
}
.btn:focus-visible {
outline: 1px solid var(--brand-9);
outline-offset: 2px;
}
/* outlined button styles */
.btn.outlined {
background: none;
border: 1px solid var(--brand-9);
}
@media (hover: hover) {
.btn.outlined:hover {
background: var(--brand-8);
border: 1px solid var(--brand-8);
}
}
.btn.outlined:active {
background: var(--brand-9);
border: 1px solid var(--brand-9);
}
/* transparent button styles */
.btn.transparent {
background: none;
border: 1px solid #ffffff00;
}
@media (hover: hover) {
.btn.transparent:hover {
background: var(--dark-5);
border: 1px solid var(--dark-5);
}
}
.btn.transparent:active {
background: var(--dark-1);
border: 1px solid var(--dark-1);
}
/* for icon button */
.btn.icon {
padding: 0.35rem;
border-radius: 6px;
}
/* additional btn styles */
.btn.full_width {
width: 100%;
}
header {
/*
equvalent to
padding-block: 20px;
padding-inline: 0px;
*/
padding: 20px 0;
width: 100%;
background: var(--dark-1);
/* place elements container in center */
display: flex;
align-items: center;
justify-content: center;
}
.header__content {
display: flex;
align-items: center;
justify-content: space-between;
/* minimal gap */
gap: 1rem;
}
.card {
/*
you just can set aspect-ratio & 100% width
height will be calculated according to aspect-ratio
*/
width: 100%;
aspect-ratio: 9/5;
/* setting bg image */
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
background-image: url('./assets/images/card/tesla.png');
}
.card__content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: start;
gap: 20px;
padding-top: 12px;
}
/* styles for h1 and .btn that will be only in .card__content class block */
.card__content>h1 {
text-align: center;
}
.card__content>.btn {
width: 150px;
}
.product_card {
background: var(--dark-1);
border: 1px solid var(--dark-2);
overflow: hidden;
border-radius: 8px;
}
.product_card__cover {
width: 100%;
object-fit: cover;
aspect-ratio: 3/2;
}
.product_card__info {
padding: 6px;
}
.product_card__name {
font-size: 1rem;
color: var(--gray-6);
}
.product_card__price {
font-weight: 600;
color: var(--gray-4);
font-size: 1.333rem;
margin-top: 6px;
}
.product_card .btn {
margin-top: 14px;
}
.catalog__wrapper {
margin-top: 20px;
display: grid;
grid-template-columns: repeat(2, 1fr);
column-gap: 0.667rem;
row-gap: 0.667rem;
}
.catalog {
padding-top: 30px;
}
.catalog>.container>.btn {
margin-top: 16px;
}
.faq {
padding-top: 50px;
}
.faq__wrapper {
margin-top: 20px;
}
.faq_item {
width: 100%;
}
.faq_item__button {
padding-block: 8px;
padding-inline: 0;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.faq_item__icon {
width: 2rem;
aspect-ratio: 1/1;
}
.faq_item__answer {
/* hide when closed */
display: none;
}
.faq_item+.faq_item {
margin-top: 16px;
}
footer {
padding-top: 40px;
padding-bottom: 50px;
background: var(--dark-1);
margin-top: 80px;
}
.footer__item+.footer__item {
margin-top: 20px;
}
.footer__logo {
height: 60px;
}
.footer__links {
display: grid;
grid-template-columns: repeat(2, 1fr);
column-gap: 2rem;
row-gap: 2rem;
}
.footer__links__item__title {
font-weight: 500;
color: var(--gray-3);
font-size: 1.333rem;
}
.footer__links__item__wrapper {
display: flex;
flex-direction: column;
gap: 6px;
margin-top: 10px;
}
.footer__links__item__wrapper>a {
font-size: 1.167rem;
color: var(--gray-6);
}
.footer__sign {
font-size: 1.167rem;
color: var(--gray-8);
}
.footer__credentials {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.footer__icons {
display: flex;
align-items: center;
gap: 10px;
}
.footer_icon {
width: 20px;
height: 20px;
}
footer>.container+.container {
margin-top: 40px;
}