Skip to content
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

Reduce spacing between nav items #5310

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Reduce spacing between nav items #5310

merged 1 commit into from
Jul 23, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jul 22, 2024

Before
Screenshot 2024-07-22 at 3 56 46 PM


After
Screenshot 2024-07-22 at 3 56 38 PM

@zanieb zanieb added documentation Improvements or additions to documentation preview Experimental behavior labels Jul 22, 2024
@zanieb zanieb marked this pull request as ready for review July 22, 2024 20:58
@zanieb
Copy link
Member Author

zanieb commented Jul 22, 2024

This gets us 6 more items above the fold.


.md-nav--secondary .md-nav__link {
margin-top: 0.5em;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll admit that I'm hesitant to add stuff like this for a few reasons: (1) we need to test it against all responsive breakpoints, not just on desktop; (2) it's not robust to updates to MkDocs or Material for MkDocs (what if they change the styling, or even the class names -- we'd have no way of knowing that this broke other than visual inspection).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the concern, but the default navigation is going to be a problem. I'm not sure what to suggest as an alternative.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. There is a very good chance that this will silently break at some point. But I think you hear me.

At the very least, could I request that you: (1) add comments to each change in the CSS, and (2) add screenshots for all breakpoints?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely hear you. I'm happy to take an alternative approach if there is one. Otherwise, I think this is (1) not a huge deal if there's a regression, though I could see how changes could interact badly if / when we have more custom CSS (2) a temporary solution until we revisit documentation rendering as a whole.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sent a DM about the breakpoints)

}

.md-nav--secondary .md-nav__link {
margin-top: 0.5em;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this specific change was to prevent the right-side TOC from also being condensed.

@zanieb
Copy link
Member Author

zanieb commented Jul 22, 2024

Screenshot 2024-07-22 at 5 25 20 PM Screenshot 2024-07-22 at 5 25 30 PM Screenshot 2024-07-22 at 5 25 39 PM Screenshot 2024-07-22 at 5 39 04 PM

@zanieb
Copy link
Member Author

zanieb commented Jul 22, 2024

Dropped #5130 from here — it's more complicated. The useless "uv" title on the navbar remains.

@zanieb zanieb merged commit 49ea4a7 into main Jul 23, 2024
44 checks passed
@zanieb zanieb deleted the zb/docs-nav branch July 23, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants