Make the current page more visible in sidebar #6677
-
SummaryIt's difficult to see where you are in the sidebar. I want the current page on the sidebar to stand out more. I recommend copy/pasting GitHub Docs's current sidebar styling, or at least getting inspired by that. 🙃 What's the problem?Here's the current page in the sidebar styling on the official Material for MkDocs page: And for good measure, the current Renovate docs styling: The only thing that changes is that the current item on the sidebar gets a different color. There's no other state change, like text size, background or a symbol added. I have good vision, and even I don't really notice this color change. The items on the sidebar that have been "scrolled past" get a muted grey text color, which is too subtle. Also, I don't like how that reduces the contrast rating from AAA to AA. So the old stuff becomes harder to see. Good exampleI love how GitHub Docs style their current sidebar: Note how the background changes, and there's a nice colored bar to the left of the current item. I can see right away which item in the sidebar is active. Comparison between MkDocs and GitHub
Proposed fixCopy/paste GitHub Docs's styling. 🙃 So:
DiscussionI look forward to hearing what the maintainers think! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
FWIW I agree there is room for improvement here. It should be possible(?) to make the changes with customization but we should also look at improving the default, especially when it comes to accessibility - for people with low vision or color-blindness in this case. |
Beta Was this translation helpful? Give feedback.
-
We're planning to do a facelift later this year, if our funds and time available allows for that, and this will definitely be addressed as part of it. In the meantime, it's quite simple to adjust the style with some additional CSS. |
Beta Was this translation helpful? Give feedback.
-
Maybe not exactly what you're asking for, but this extra CSS should improve the readability similar to GitHub's docs: .md-nav__link--active {
background-color: var(--md-code-bg-color);
border-radius: 0.2em;
padding: 0.2em;
outline: 0.1em solid;
}
/* Additional styling to fix glitches */
.md-sidebar__inner {
padding-top: 0.1em;
}
.md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link {
box-shadow: initial;
} firefox_quwzTnDSaa.mp4 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Maybe not exactly what you're asking for, but this extra CSS should improve the readability similar to GitHub's docs:
firefox_quwzTnDSaa.mp4