效果如下:
CSS 代码片段(二选一):
/* 反链、提及面板固定文档名称 CSS片段 */
/* author by JeffreyChen https://ld246.com/article/1737207365006 */
/* TODO 需要跟进 https://github.com/siyuan-note/siyuan/issues/13679 修改*/
.backlinkMList .b3-list-item,
.backlinkList .b3-list-item {
position: sticky;
top: 0;
padding: 0;
margin: 0;
z-index: 4; /* 高于选中块的伪元素高亮 */
background-color: var(--b3-theme-surface) !important;
border-radius: unset;
&:hover::after {
content: "";
position: absolute;
height: 100%;
width: 100%;
background-color: var(--b3-list-hover);
border-radius: var(--b3-border-radius);
pointer-events: none;
}
&>.b3-list-item__toggle {
padding: 0 6px !important;
margin-left: 4px;
}
&>.counter {
margin-right: 4px;
}
}
第二个方案已用于 Whisper 主题:
/* 反链、提及面板固定文档名称 CSS片段 */
/* author by JeffreyChen https://ld246.com/article/1737207365006 */
/* TODO 需要跟进 https://github.com/siyuan-note/siyuan/issues/13679 修改*/
.backlinkMList .b3-list-item,
.backlinkList .b3-list-item {
position: sticky;
top: 0;
padding: 0;
margin: 0;
z-index: 4; /* 高于选中块的伪元素高亮 */
background-color: var(--b3-theme-surface) !important;
border-radius: unset;
&:hover {
&::after {
content: "";
position: absolute;
height: 100%;
width: 100%;
background-color: var(--b3-list-hover);
border-radius: var(--b3-border-radius);
pointer-events: none;
}
&>.b3-list-item__toggle {
color: var(--b3-theme-on-background); /* 只要箭头颜色变深就代表能展开 */
}
}
&>.b3-list-item__toggle {
margin-left: 4px;
&:hover {
background: unset;
}
}
&>.counter {
margin-right: 4px;
}
}
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于