Skip to content

Comments

Compact version switcher and improved navbar spacing#228

Merged
svekars merged 4 commits intopytorch_sphinx_theme2from
theme-0.4.3
Feb 13, 2026
Merged

Compact version switcher and improved navbar spacing#228
svekars merged 4 commits intopytorch_sphinx_theme2from
theme-0.4.3

Conversation

@svekars
Copy link
Contributor

@svekars svekars commented Feb 12, 2026

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.

@netlify
Copy link

netlify bot commented Feb 12, 2026

Deploy Preview for pytorchsphinxtheme ready!

Name Link
🔨 Latest commit 229a588
🔍 Latest deploy log https://app.netlify.com/projects/pytorchsphinxtheme/deploys/698f59576c2d810008d3c4c5
😎 Deploy Preview https://deploy-preview-228--pytorchsphinxtheme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@meta-cla meta-cla bot added the cla signed label Feb 12, 2026
Copy link

@albanD albanD left a comment

Choose a reason for hiding this comment

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

That looks great!
Much more readable with the extra space!

@svekars svekars merged commit d792e19 into pytorch_sphinx_theme2 Feb 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants