Skip to content

Commit 54934f5

Browse files
author
“ danbaruka”
committed
fix: ensure active sidebar menu items display in blue
- Add specific CSS selectors to override Docusaurus default styling - Use direct color value #0128aa instead of CSS variables - Cover all pseudo-states (:visited, :focus, :active) - Apply consistent styling for both light and dark modes - Remove background color from active menu items - Maintain bold font weight for active items
1 parent f2349cf commit 54934f5

1 file changed

Lines changed: 71 additions & 3 deletions

File tree

website/src/css/custom.css

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,82 @@
299299
}
300300

301301
.menu__link--active {
302-
background: transparent;
303-
color: var(--ifm-color-primary);
302+
background: transparent !important;
303+
color: #0128aa !important;
304304
font-weight: 600;
305305
}
306306

307+
.menu__link--active:hover {
308+
background: transparent !important;
309+
color: #0128aa !important;
310+
}
311+
312+
/* More specific selectors for active menu items */
313+
.theme-doc-sidebar-container .menu__link--active {
314+
color: #0128aa !important;
315+
background: transparent !important;
316+
}
317+
318+
.theme-doc-sidebar-container .menu__link--active:hover {
319+
color: #0128aa !important;
320+
background: transparent !important;
321+
}
322+
323+
/* Override any conflicting styles */
324+
.menu__link--active,
325+
.menu__link--active:visited,
326+
.menu__link--active:focus,
327+
.menu__link--active:active {
328+
color: #0128aa !important;
329+
background: transparent !important;
330+
}
331+
332+
.menu__link {
333+
color: var(--ifm-color-content) !important;
334+
}
335+
307336
.menu__link:hover {
308337
background: rgba(1, 40, 170, 0.05);
309-
color: var(--ifm-color-primary);
338+
color: var(--ifm-color-content) !important;
339+
}
340+
341+
/* Dark mode sidebar fixes */
342+
[data-theme='dark'] .menu__link {
343+
color: var(--ifm-color-content) !important;
344+
}
345+
346+
[data-theme='dark'] .menu__link:hover {
347+
color: var(--ifm-color-content) !important;
348+
}
349+
350+
[data-theme='dark'] .menu__link--active {
351+
background: transparent !important;
352+
color: #0128aa !important;
353+
}
354+
355+
[data-theme='dark'] .menu__link--active:hover {
356+
background: transparent !important;
357+
color: #0128aa !important;
358+
}
359+
360+
/* More specific dark mode selectors */
361+
[data-theme='dark'] .theme-doc-sidebar-container .menu__link--active {
362+
color: #0128aa !important;
363+
background: transparent !important;
364+
}
365+
366+
[data-theme='dark'] .theme-doc-sidebar-container .menu__link--active:hover {
367+
color: #0128aa !important;
368+
background: transparent !important;
369+
}
370+
371+
/* Override dark mode conflicting styles */
372+
[data-theme='dark'] .menu__link--active,
373+
[data-theme='dark'] .menu__link--active:visited,
374+
[data-theme='dark'] .menu__link--active:focus,
375+
[data-theme='dark'] .menu__link--active:active {
376+
color: #0128aa !important;
377+
background: transparent !important;
310378
}
311379

312380
/* Responsive design improvements */

0 commit comments

Comments
 (0)