Compact version switcher and improved navbar spacing#228
Merged
svekars merged 4 commits intopytorch_sphinx_theme2from Feb 13, 2026
Merged
Compact version switcher and improved navbar spacing#228svekars merged 4 commits intopytorch_sphinx_theme2from
svekars merged 4 commits intopytorch_sphinx_theme2from
Conversation
✅ Deploy Preview for pytorchsphinxtheme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
albanD
approved these changes
Feb 13, 2026
albanD
left a comment
There was a problem hiding this comment.
That looks great!
Much more readable with the extra space!
sekyondaMeta
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The version-switcher dropdown button in the navbar was too wide (showing the full version string like v2.11.0 (cu128)) and sat too close to the PyTorch logo. This PR addresses both issues:
Version switcher truncation — Long version strings are now truncated using CSS max-width + text-overflow: ellipsis, so v2.11.0 (cu128) displays as v2.11.0. The dropdown caret is absolutely positioned to stay visible despite overflow clipping. The version text is styled in the theme's primary color with bold weight for better visual hierarchy.
Logo-to-version spacing — Added 0.5rem left margin on the .desktop-only-version element to create breathing room between the logo and the version switcher.
Logo image sizing — Constrained the navbar logo to max-height: 20px to sit proportionally within the header bar.