fix(docs): match reference navigation and search hover colors

This commit is contained in:
maoyingjie
2026-10-28 08:49:11 +08:00
parent 28b0b3f0b6
commit 652cf854be
+13 -5
View File
@@ -127,9 +127,7 @@ html {
gap: 12px; gap: 12px;
height: 100%; height: 100%;
} }
/* Section tabs keep their text treatment on hover; selection controls color. */ .docs-nav-sections nav .hv-link {
.docs-nav-sections nav .hv-link,
.docs-nav-sections nav .hv-link:is(:hover, [data-hovered="true"]) {
text-decoration: none; text-decoration: none;
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
@@ -146,6 +144,11 @@ html {
border-color: var(--accent); border-color: var(--accent);
color: var(--foreground); color: var(--foreground);
} }
@media (hover: hover) {
.docs-nav-sections nav .hv-link:is(:hover, [data-hovered="true"]) {
color: var(--foreground);
}
}
.docs-theme-wide { .docs-theme-wide {
padding: 2px; padding: 2px;
border-radius: 999px; border-radius: 999px;
@@ -474,6 +477,7 @@ html {
margin-left: auto; margin-left: auto;
} }
.search-trigger .hv-kbd { .search-trigger .hv-kbd {
color: inherit;
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
font-size: 14px; font-size: 14px;
@@ -485,6 +489,11 @@ html {
box-shadow: none; box-shadow: none;
white-space: nowrap; white-space: nowrap;
} }
@media (hover: hover) {
.search-trigger:is(:hover, [data-hovered="true"]) {
color: var(--foreground);
}
}
.dark .search-trigger { .dark .search-trigger {
background: color-mix( background: color-mix(
in oklab, in oklab,
@@ -720,8 +729,7 @@ html {
.docs-nav-sections nav { .docs-nav-sections nav {
gap: 20px; gap: 20px;
} }
.docs-nav-sections nav .hv-link, .docs-nav-sections nav .hv-link {
.docs-nav-sections nav .hv-link:is(:hover, [data-hovered="true"]) {
font-size: 13px; font-size: 13px;
padding-bottom: 6px; padding-bottom: 6px;
} }