-
Notifications
You must be signed in to change notification settings - Fork 9
Styling Fix #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styling Fix #168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the left side navigation styling by adding an active state style for Table of Contents (TOC) items and fixing unwanted spacing issues caused by empty nested navigation structures.
Key changes:
- Adds visual styling for active TOC links with background color and border radius
- Implements logic to conditionally render navigation containers only when they contain visible children
- Refactors the template to pre-filter visible children instead of filtering during iteration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| material-overrides/partials/nav-item.html | Added logic to check for visible children before rendering navigation containers, preventing empty divs that cause spacing issues |
| material-overrides/assets/stylesheets/polkadot.css | Added active state styling for TOC links with background color and border radius across different screen sizes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@0xlukem please tag me here or DM me in slack when this is ready for me. Thanks! |
eshaben
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR adds a new active style for the TOC and fixes some spacing issues on the left side navigation.


Before:
After:
The issue was caused because mkdocs resolved that the section block explorer was a nested one (like the one above) and added a div, which caused the extra blank space. So, I added logic to check if there is real nested content or not.