-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Tweak the CSS of the TOC sidebar #2037
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
Conversation
Only put the navigation across other pages in the <nav> element.
Use semantic HTML to make the table of contents in the sidebar collapsible.
Make sidebar.scss the single-source-of-truth and put all the styling related to the sidebar in sidebar.scss.
Give the sidebar the same background as the main content and make the border wrap around the table of contents.
To1ne
commented
Aug 15, 2025
@dscho
dscho
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.
I wonder whether it is even possible to keep the table of contents sticky without it being in the <nav> section...
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.
I think that the translated books may want to stay in the <nav> bar?
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.
I think that the translated books may want to stay in the
bar?
@dscho Maybe, yes. I didn't check the book yet. I should have. Putting it on my list.
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.
@dscho Why are book translations in the sidebar and man page translations at the top? I think they all should go in the top nav.
To1ne
commented
Aug 16, 2025
I wonder whether it is even possible to keep the table of contents sticky without it being in the
section...
@dscho Yeah, that's something I wanted to figure out still.
To1ne
commented
Aug 16, 2025
@dscho This is still work-in-progress to see if we like the design. Once we settle on the look, I will figure out how to make it all work.
To1ne
commented
Aug 17, 2025
dscho
commented
Aug 17, 2025
I like that! @jvns what is your opinion?
jvns
commented
Aug 17, 2025
I like the way it connects to the page's content! It feels a little weird to push the main navigation down like that -- in a way it seems like the "table of contents" should actually be a sub-item of "Reference" somehow (like we're at Documentation -> Reference -> git-add. But I don't see a way to put it there.
To1ne
commented
Aug 17, 2025
@jvns I kind a like that idea. I've been wanted to have more like a breadcrumbs style navigation and that's what you're suggesting with Documentation -> Reference -> git-add. Now putting that in the sidebar, and then the headings of that page in that tree will nest them very deep and indentation will make it impossible to have headings that are longer than a few chars. So far from ideal.
Personally I think the whole navigation on this website is awkward. Maybe a bigger overhaul is needed. If we can find someone to put the work into that (not sure that one will be me, but I'll think about it). cc @dscho
Uh oh!
There was an error while loading. Please reload this page.
Changes
An attempt to make it look more pretty.
Context
Recently the TOC was added, in the sidebar. This PR attempts to make it integrate better into the aesthetic.
20250815_13h57m44s_grimDeployed to https://to1ne.github.io/git-scm.com/docs/git-rebase
TODO