forked from WebDevSimplified/css-vertical-timeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
122 lines (103 loc) · 1.94 KB
/
styles.css
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
*, *::before, *::after {
box-sizing: border-box;
}
:root {
--subdued-color: hsl(200, 100%, 50%);
--text-color: hsl(200, 100%, 20%);
--avatar-size: 50px;
--grid-gap: 1rem;
--group-header-spacing: 1rem;
}
.notification-section {
margin-bottom: 2rem;
}
.notification-section:last-child {
margin-bottom: 0;
}
body {
background-color: #F3F3F3;
color: var(--text-color);
}
.avatar > img {
width: 100%;
border-radius: 100%;
border: 2px solid white;
display: block;
}
.notification-grid {
display: grid;
grid-template-columns: var(--avatar-size) 1fr;
grid-auto-rows: auto;
gap: var(--grid-gap);
max-width: 750px;
width: 100%;
margin: 0 auto;
}
.avatar {
position: relative;
}
.avatar::after {
content: "";
position: absolute;
background-color: var(--subdued-color);
width: 1px;
left: 0;
right: 0;
margin: 0 auto;
top: var(--avatar-size);
bottom: calc(var(--grid-gap) * -1);
}
.avatar:first-child::before {
content: "";
position: absolute;
background-color: var(--subdued-color);
width: 1px;
left: 0;
right: 0;
margin: 0 auto;
top: calc(-1 * var(--group-header-spacing));
bottom: 100%;
}
.avatar:nth-last-child(2)::after {
display: none;
}
.notification-card {
background-color: white;
border: 1px solid var(--subdued-color);
border-radius: .25rem;
padding: .75rem;
}
.notification-header {
display: flex;
gap: .5rem;
}
.icon {
width: 20px;
height: 20px;
}
.notification-title {
flex-grow: 1;
font-size: 1.1rem;
}
.notification-time {
color: var(--subdued-color);
}
.notification-content {
background-color: #F0F0F0;
margin-top: .5rem;
padding: .25rem;
border-radius: .25rem;
}
.icon > path {
fill: var(--subdued-color);
}
.group-header {
display: flex;
justify-content: space-between;
border-bottom: 1px solid var(--subdued-color);
padding-bottom: .25rem;
margin-bottom: var(--group-header-spacing);
}
.group-date {
color: var(--subdued-color);
}