Skip to content

Fix dropdown width and add MyST directives test page - #251

Merged
svekars merged 2 commits into
pytorch_sphinx_theme2from
fix-dropdown
May 19, 2026
Merged

Fix dropdown width and add MyST directives test page#251
svekars merged 2 commits into
pytorch_sphinx_theme2from
fix-dropdown

Conversation

@svekars

@svekars svekars commented May 19, 2026

Copy link
Copy Markdown
Contributor
  • Fix sphinx-design {dropdown} directives rendering at only 30% page width instead of full article width
  • Add comprehensive test page (test-myst-directives.md) covering all common MyST and sphinx-design
    directives

The issue

.sd-card in _sphinx_design.scss sets width: 30% and max-width: 500px for 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-dropdown overrides in _sphinx_design.scss that set width: 100% and max-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

@meta-cla meta-cla Bot added the cla signed label May 19, 2026
@netlify

netlify Bot commented May 19, 2026

Copy link
Copy Markdown

Deploy Preview for pytorchsphinxtheme ready!

Name Link
🔨 Latest commit b3813cc
🔍 Latest deploy log https://app.netlify.com/projects/pytorchsphinxtheme/deploys/6a0cc47836bedd0008f9fc9f
😎 Deploy Preview https://deploy-preview-251--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.

@svekars
svekars merged commit 474a344 into pytorch_sphinx_theme2 May 19, 2026
3 checks passed
@malfet malfet mentioned this pull request Aug 27, 2026
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>
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.

1 participant