-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstyle.css
More file actions
103 lines (97 loc) · 1.87 KB
/
Copy pathstyle.css
File metadata and controls
103 lines (97 loc) · 1.87 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
* {
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
font-family: "Ubuntu", sans-serif;
margin: 0;
--header-height: 2rem;
}
.content {
max-width: 64rem;
margin: auto;
padding: 3rem 2rem;
}
.header {
margin-bottom: 1.5rem;
}
.header__text {
font-size: var(--header-height);
line-height: var(--header-height);
font-weight: 600;
}
.header__link {
position: fixed;
right: 2.5rem;
top: 1rem;
height: var(--header-height);
display:flex;
align-items:center;
justify-content:center;
color: rgba(41, 102, 222, 1);
cursor: pointer;
}
.header__name {
font-size: 0.95rem;
font-weight: 400;
}
.header__icon {
margin-left: 0.5rem;
font-size: 1.3rem;
opacity: 0.9;
}
/* pinterest-like layout */
.cards {
column-count: 4;
column-gap: 1rem;
}
/* Set .content width to 18-33-48-63rem, based on screen width */
@media (max-width: 33rem) {
.cards { column-count: 1; }
.content { max-width: 18rem; }
}
@media (min-width: 33rem) and (max-width: 48rem) {
.cards { column-count: 2; }
.content { max-width: 33rem; }
}
@media (min-width: 48rem) and (max-width: 63rem) {
.cards { column-count: 3; }
.content { max-width: 48rem; }
}
@media (min-width: 63rem) {
.cards { column-count: 4; }
.content { max-width: 64rem; }
}
.card {
width: 14rem;
min-height: 9rem;
margin-bottom: 1rem;
background-color: rgba(0,0,0,0.05);
border-radius: 1rem;
position: relative;
display: inline-block;
cursor: pointer;
}
/* Using BEM for naming: https://www.geeksforgeeks.org/css/understanding-the-css-bem-convention */
.card__img {
width: 100%;
height: 100%;
min-height:100%;
border-radius: 1rem;
}
.card__text {
padding: 1.7rem 1.2rem;
position: absolute;
top: 0;
}
.card__text--white {
color: white;
}
.card__text--black {
color: black;
}
.card__message {
font-size: 1.3rem;
margin-bottom: 0.5rem;
font-weight: 500;
}