fix(docs): align navigation colors and remove hover underlines

This commit is contained in:
maoyingjie
2026-10-24 07:44:12 +08:00
parent f8f9555bd7
commit eddfbd2def
4 changed files with 28 additions and 18 deletions
-5
View File
@@ -43,7 +43,6 @@ import {
IconComponents,
IconList,
IconChevronDown,
IconBrandVue,
IconBrandGithub,
IconArrowLeft,
IconArrowRight,
@@ -325,10 +324,6 @@ async function copyMarkdownCode(event: MouseEvent) {
组件
</Link>
</nav>
<Chip class="framework" size="sm" variant="soft">
<IconBrandVue :size="14" aria-hidden="true" />
Vue 3
</Chip>
</div>
</header>
<div class="docs-body">
+23 -13
View File
@@ -5,6 +5,14 @@
--docs-header-height: 100px;
--docs-sidebar-width: 220px;
--docs-toc-width: 268px;
/* Fumadocs neutral navigation colors, separate from component muted text. */
--docs-nav-muted: var(--color-neutral-500, #737373);
--docs-nav-foreground: oklch(0.14 0 0);
--docs-nav-hover: rgb(0 0 0 / 4%);
}
.dark {
--docs-nav-foreground: oklch(0.99 0 0);
--docs-nav-hover: rgb(255 255 255 / 6%);
}
html {
scroll-padding-top: 154px;
@@ -134,9 +142,6 @@ html {
border-color: var(--accent);
color: var(--foreground);
}
.docs-nav-sections .framework {
margin: 0 0 6px auto;
}
.docs-theme-wide {
padding: 2px;
border-radius: 999px;
@@ -188,6 +193,7 @@ html {
padding: 4px 8px;
font-size: 14px;
font-weight: 500;
color: var(--docs-nav-foreground);
}
.sidebar-tree .hv-link {
display: flex;
@@ -196,19 +202,21 @@ html {
margin: 2px 0;
font-size: 14px;
line-height: 20px;
color: var(--muted);
color: var(--docs-nav-muted);
font-weight: 400;
text-decoration: none;
border-radius: var(--radius-field);
word-break: keep-all;
overflow-wrap: break-word;
}
.sidebar-tree .hv-link:hover {
background: var(--default-soft);
color: var(--foreground);
.sidebar-tree .hv-link:is(:hover, [data-hovered="true"]) {
background: var(--docs-nav-hover);
color: color-mix(in oklab, var(--docs-nav-foreground) 80%, transparent);
}
.sidebar-tree .hv-link[aria-current="page"] {
background: var(--surface);
box-shadow: var(--surface-shadow);
color: var(--foreground);
color: var(--docs-nav-foreground);
}
.community {
font-size: 11px;
@@ -269,7 +277,7 @@ html {
display: flex;
align-items: center;
gap: 6px;
color: var(--muted);
color: var(--docs-nav-muted);
font-size: 14px;
margin: 0 0 16px;
}
@@ -288,20 +296,22 @@ html {
padding: 6px 8px 6px 12px;
line-height: 1.5;
font-size: 13px;
color: var(--muted);
color: var(--docs-nav-muted);
font-weight: 400;
text-decoration: none;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.toc-links .hv-link[aria-current="location"] {
box-shadow: inset 1px 0 var(--foreground);
box-shadow: inset 1px 0 var(--docs-nav-foreground);
}
.toc-links .hv-link.nested {
padding-left: 24px;
}
.toc-links .hv-link:hover,
.toc-links .hv-link:is(:hover, [data-hovered="true"]),
.toc-links .hv-link[aria-current="location"] {
color: var(--foreground);
color: var(--docs-nav-foreground);
}
.mobile-toc {
display: none;