-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtoc.css
More file actions
56 lines (49 loc) · 1.18 KB
/
toc.css
File metadata and controls
56 lines (49 loc) · 1.18 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
/* General TOC container */
#table-of-contents-content {
padding-left: 0;
}
/* Each TOC item */
#table-of-contents-content .toc-item {
list-style: none;
padding: 2px 0;
}
/* Flex container for anchor and toggle */
#table-of-contents-content .toc-row {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
/* Anchor link styling */
#table-of-contents-content .toc-row a {
flex-grow: 1; /* Allow anchor to take available space */
text-decoration: none;
color: inherit;
word-wrap: break-word;
white-space: normal;
}
/* Toggle button styling */
.toc-toggle {
background: transparent;
border: none;
cursor: pointer;
color: inherit;
padding: 0 0.5rem;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0; /* Prevent toggle from shrinking */
}
.toc-toggle:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
border-radius: 4px;
}
/* Chevron icon transition */
.toc-toggle svg {
transition: transform 150ms ease-in-out;
}
/* Rotated state for chevron when collapsed */
.toc-toggle.rotated svg {
transform: rotate(-90deg);
}