-
Notifications
You must be signed in to change notification settings - Fork 0
/
toc.css
52 lines (43 loc) · 976 Bytes
/
toc.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
<style>
/* Table of contents */
.table-of-contents {
display: flex;
flex-direction: column;
width: fit-content;
background: #f5f5f5;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
padding: 11px;
margin: 8px 0 30px 0;
transition: all 0.2s ease-in-out;
}
.table-of-contents:hover {
background: #ddd;
}
.table-of-contents h4 {
margin: 0;
cursor: pointer;
transition: color 0.2s ease-in-out;
}
.table-of-contents h4:hover {
color: #1d3557;
}
.table-of-contents ul {
margin: 0;
padding: 0;
list-style: none;
overflow: hidden;
height: 0; /* set initial height to 0 */
transition: height 0.2s ease-in-out;
}
.table-of-contents ul.show {
height: auto; /* set height to auto when the show class is added */
}
.table-of-contents li {
transition: opacity 0.2s ease-in-out;
}
.table-of-contents li:hover {
opacity: 0.7;
}
</style>