-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToDo.html
More file actions
90 lines (89 loc) · 1.7 KB
/
ToDo.html
File metadata and controls
90 lines (89 loc) · 1.7 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
<!DOCTYPE html>
<html>
<head>
<style>
*, *::before, *::after {
margin: 0;
border: 0;
padding: 0;
box-sizing: border-box;
}
:root {
background: #1A1B1C;
font-size: 62.5%;
font-family: Calibri, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
color: var(--foreground);
--foreground: #dcdcdc;
}
body {
overflow-x: hidden;
}
h1 {
text-align: center;
font-size: 5rem;
}
li {
font-size: 1.8rem;
padding: 1.8rem 4rem 1.8rem 4rem;
border-radius: 5px;
margin: 0.3rem 2rem 0.3rem 2rem;
background: #242426;
list-style-type: none;
cursor: pointer;
position: relative;
overflow: hidden;
}
li:hover { background: #292929 }
li::before {
content: "";
position: absolute;
width: 2.2rem;
height: 2.2rem;
border-radius: 50%;
border: 0.25rem solid var(--foreground);
left: 1rem;
}
li.hide::before {
background-color: var(--foreground);
}
.hide {
white-space: nowrap;
animation: slideOut 1s ease-out, fade 0.5s forwards, shrink 0.2s 0.5s forwards;
}
@keyframes slideOut {
to {
margin-left: 100%;
}
}
@keyframes fade {
to {
opacity: 0;
margin-right: 0;
}
}
@keyframes shrink {
to {
height: 0;
padding: 0;
margin: 0;
}
}
</style>
<title>To Do</title>
</head>
<body>
<h1>To Do</h1>
<ul>
<li>Add tutorial</li>
</ul>
</body>
<script>
function vanish(event) {
event.target.classList.add("hide");
setTimeout(() => {event.target.remove()}, 700);
}
for (let i of document.querySelectorAll("li")) {
i.addEventListener("click", vanish);
}
</script>
</html>