Repository navigation
Expand file tree
/
Copy pathtoc.css
More file actions
55 lines (48 loc) · 1.6 KB
/
Copy pathtoc.css
File metadata and controls
55 lines (48 loc) · 1.6 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
/* 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;
}
/* Mintlify gives top-level items 1rem (for the rail) and nested items depth * 1rem,
so depth 0 and depth 1 line up. Shift nested items one level further in.
!important is needed because Mintlify can set this variable inline. */
#table-of-contents-content .toc-item[data-depth="1"] > a { --toc-padding-left: 2rem !important; }
#table-of-contents-content .toc-item[data-depth="2"] > a { --toc-padding-left: 3rem !important; }
#table-of-contents-content .toc-item[data-depth="3"] > a { --toc-padding-left: 4rem !important; }
#table-of-contents-content .toc-item[data-depth="4"] > a { --toc-padding-left: 5rem !important; }
/* Leave room for the toggle on items that have children */
#table-of-contents-content .toc-item:has(> .toc-toggle) > a {
padding-right: 1.75rem;
}
/* Toggle button styling, pinned to the right of the item's first line */
.toc-toggle {
position: absolute;
top: 0.25rem;
right: 0;
height: 1.5rem;
background: transparent;
border: none;
cursor: pointer;
color: inherit;
padding: 0 0.5rem;
display: inline-flex;
align-items: center;
justify-content: center;
}
.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);
}