Skip to content

Commit 7957695

Browse files
committed
imporve tabbed labels and nav_link hover UI in dark mode
1 parent 473bb50 commit 7957695

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/stylesheets/extra.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,18 @@ a.md-nav__link:hover {
108108
padding: 1px 2px;
109109
}
110110

111+
[data-md-color-scheme="slate"] a.md-nav__link:hover {
112+
background-color: #a9b0b9;
113+
}
111114
.md-typeset a:hover {
112115
background-color: #dfe7f5;
113116
color:hotpink;
114117
}
115118

119+
[data-md-color-scheme="slate"] .md-typeset a:hover {
120+
background-color: #2d333b;
121+
color: hotpink;
122+
}
116123

117124
/* https://github.com/squidfunk/mkdocs-material/discussions/6974#discussioncomment-9083720 */
118125

@@ -212,3 +219,22 @@ del.critic {
212219
.md-typeset table:not([class]) {
213220
border-radius: var(--base-border-radius); /* 使用全局变量定义边框半径 */
214221
}
222+
223+
Fix tab hover in dark mode [data-md-color-scheme="slate"] .tabbed-labels label:hover,
224+
[data-md-color-scheme="slate"] .tabbed-labels--linked label:hover,
225+
[data-md-color-scheme="slate"] .tabbed-set>.tabbed-labels label:hover {
226+
background-color: #30363d !important;
227+
color: #e6edf3 !important;
228+
}
229+
230+
[data-md-color-scheme="slate"] .tabbed-labels label:hover a,
231+
[data-md-color-scheme="slate"] .tabbed-labels--linked label:hover a,
232+
[data-md-color-scheme="slate"] .md-typeset .tabbed-labels label:hover a {
233+
background-color: #30363d !important;
234+
color: #e6edf3 !important;
235+
}
236+
237+
[data-md-color-scheme="slate"] .tabbed-set input:checked+label {
238+
background-color: var(--md-accent-fg-color) !important;
239+
color: var(--md-primary-bg-color) !important;
240+
}

0 commit comments

Comments
 (0)