Skip to content

Commit 9df7f58

Browse files
87xiedimaMachina
andauthoredAug 21, 2024··
[v3] fix nav-links not highlighting on hover in dark mode (#3109)
* [v3] fix nav-links not highlighting on hover in dark mode * update .changeset/polite-baboons-look.md * fix --------- Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
1 parent a90b90f commit 9df7f58

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed
 

‎.changeset/polite-baboons-look.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'nextra-theme-docs': patch
3+
---
4+
5+
Fix nav-links not highlighting on hover in dark mode

‎packages/nextra-theme-docs/src/components/nav-links.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ interface NavLinkProps {
1414

1515
const classes = {
1616
link: cn(
17-
'_flex _max-w-[50%] _items-center _gap-1 _py-4 _text-base _font-medium _text-gray-600 _transition-colors [word-break:break-word] hover:_text-primary-600 dark:_text-gray-300 md:_text-lg'
17+
'_text-gray-600 dark:_text-gray-400',
18+
'hover:_text-gray-800 dark:hover:_text-gray-200',
19+
'contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100',
20+
'_flex _max-w-[50%] _items-center _gap-1 _py-4 _text-base _font-medium _transition-colors [word-break:break-word] md:_text-lg'
1821
),
1922
icon: cn('_inline _h-5 _shrink-0')
2023
}

‎packages/nextra-theme-docs/src/components/toc.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ export type TOCProps = {
1515
}
1616

1717
const linkClassName = cn(
18-
'_text-xs _font-medium _text-gray-500 hover:_text-gray-900 dark:_text-gray-400 dark:hover:_text-gray-100',
19-
'contrast-more:_text-gray-800 contrast-more:dark:_text-gray-50'
18+
'_text-xs _font-medium',
19+
'_text-gray-600 dark:_text-gray-400',
20+
'hover:_text-gray-800 dark:hover:_text-gray-200',
21+
'contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100'
2022
)
2123

2224
export function TOC({ toc, filePath }: TOCProps): ReactElement {

0 commit comments

Comments
 (0)
Please sign in to comment.