Fix dropdown width and add MyST directives test page - #251
Merged
Conversation
✅ Deploy Preview for pytorchsphinxtheme ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Merged
malfet
added a commit
that referenced
this pull request
Aug 27, 2026
0.4.11 shipped to PyPI on 2026-05-19 but its bump branch was never merged, so the changelog jumped 0.4.10 to 0.4.12 while the code it contained (#251) is on the branch and reaches anyone upgrading from 0.4.10. Recording it as its own section keeps that accurate for both sets of users, rather than folding it into v0.4.12 and telling existing 0.4.11 users about changes they already have. Authored with the assistance of an AI coding agent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
malfet
added a commit
that referenced
this pull request
Aug 27, 2026
* Bump theme to 0.4.12 Picks up the search relevance fix (#252) and the GitHub Actions Node 20 bumps (#253). Goes straight from 0.4.10 to 0.4.12. 0.4.11 was published to PyPI on 2026-05-19 from the `bump-theme-0.4.11` branch, which was never merged, so the branch still read 0.4.10 and there is no 0.4.11 changelog entry. This bump lands on the branch so the next release does not inherit the same gap. Test Plan: ``` python3 -c "import pytorch_sphinx_theme2 as t; print(t.__version__)" grep -rn '0\.4\.12' setup.py pytorch_sphinx_theme2/__init__.py ``` All three version strings (setup.py, __version__, and the dict returned by setup()) report 0.4.12. Authored with the assistance of an AI coding agent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Backfill v0.4.11 changelog entry 0.4.11 shipped to PyPI on 2026-05-19 but its bump branch was never merged, so the changelog jumped 0.4.10 to 0.4.12 while the code it contained (#251) is on the branch and reaches anyone upgrading from 0.4.10. Recording it as its own section keeps that accurate for both sets of users, rather than folding it into v0.4.12 and telling existing 0.4.11 users about changes they already have. Authored with the assistance of an AI coding agent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
{dropdown}directives rendering at only 30% page width instead of full article widthtest-myst-directives.md) covering all common MyST and sphinx-designdirectives
The issue
.sd-cardin_sphinx_design.scsssetswidth: 30%andmax-width: 500pxfor card grid layouts. Sphinx-design renders dropdowns as.sd-card.sd-dropdown, so dropdowns inherited these card width constraints and appeared as a narrow strip instead of spanning the full content area. See here - scroll down to dropdown.The Fix
Added
.sd-card.sd-dropdownoverrides in_sphinx_design.scssthat setwidth: 100%andmax-width: 100%, and disable the card hover underline animation on dropdowns. The selector is specific to elements with both classes, so regular cards in grids are unaffected.Test plan
npx grunt defaultcd docs && python3 -m sphinx -b html . _build/htmltest-myst-directives.htmltest-cards.htmlare unchanged (still 30% width in grids)