File size: 1,383 Bytes
96dd062
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* TOC 共享样式 */

/* TOC 滚动容器 */
.toc-scroll-container {
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

/* TOC 内容容器 */
.toc-content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	position: relative;
	overflow: visible;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	contain: layout;
	align-items: flex-start;
}

/* TOC 链接样式 */
.toc-content a {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
	border-radius: 0.75rem;
	transition: all 0.2s ease;
	width: 100%;
	min-width: 0;
	flex-shrink: 0;
	max-width: 100%;
	overflow: hidden;
	box-sizing: border-box;
	position: relative;
}

.toc-content a:hover {
	background: var(--toc-btn-hover);
}

/* 文本内容防溢出 */
.toc-content a div:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
	flex: 1;
	max-width: calc(100% - 2rem);
	box-sizing: border-box;
}

/* 徽章容器固定宽度 */
.toc-content a div:first-child {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
}

/* 活动指示器基础样式 */
.toc-active-indicator {
	position: absolute;
	left: 0;
	right: 0;
	background: var(--toc-btn-hover);
	border-radius: 0.75rem;
	transition: all 0.2s ease;
	z-index: -1;
}