style(docs): adjust sidebar spacing and fix relative links

Update CSS selectors to be more specific and remove redundant parent selectors
Change absolute links to relative paths in index.md for better portability
This commit is contained in:
sanbuphy
2026-01-12 17:38:47 +08:00
parent 0347f96547
commit d35cfb3402
2 changed files with 11 additions and 11 deletions
+7 -7
View File
@@ -4,38 +4,38 @@
}
/* 减少一级标题(如"前端开发")底部的间距 */
.VPSidebar .VPSidebarItem.level-0 {
.VPSidebarItem.level-0 {
padding-bottom: 4px;
}
/* 减少一级标题文字与下方子菜单的间距 */
.VPSidebar .VPSidebarItem.level-0 > .item {
.VPSidebarItem.level-0 > .item {
padding-bottom: 2px;
}
/* 调整子菜单项之间的间距 */
.VPSidebar .VPSidebarItem.level-1 .item {
.VPSidebarItem.level-1 .item {
padding: 2px 0;
}
/* 针对可能存在的特定类名进行覆盖,确保紧凑 */
.VPSidebar .VPSidebarGroup {
.VPSidebarGroup {
padding-top: 6px;
padding-bottom: 6px;
}
/* 进一步压缩分组标题与第一项之间的间距 */
.VPSidebar .VPSidebarItem.level-0 + .VPSidebarItem.level-1 {
.VPSidebarItem.level-0 + .VPSidebarItem.level-1 {
margin-top: -2px;
}
/* 压缩分组标题本身的行高 */
.VPSidebar .VPSidebarItem.level-0 .text {
.VPSidebarItem.level-0 .text {
line-height: 1.3;
}
/* 压缩子项的行高 */
.VPSidebar .VPSidebarItem.level-1 .text {
.VPSidebarItem.level-1 .text {
line-height: 1.4;
}