pydoc HTML output is not responsive and has no viewport meta in released versions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
python -m pydoc -w generates standalone HTML pages for modules. The output is not usable on mobile:
- The generated page has no tag in any released version (3.11-3.13). A viewport tag was added to the main branch only recently (Lib/pydoc.py), so it is not in any release yet.
- Lib/pydoc_data/_pydoc.css contains no layout media queries at all; the only @media block is
prefers-color-scheme: dark. The navigation sidebar and content are laid out with fixed widths, which overflows on narrow screens.
Related: #127276 ("Missing styles for pages created by a 'python -m pydoc -w' call", open) and #153906 (closed). This issue is specifically about the mobile/responsive behavior.
Expected: backport/keep a viewport meta tag in the generated HTML and add a max-width media query that stacks the sidebar above the content on narrow screens.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Lib/pydoc.py and Lib/pydoc_data/_pydoc.css, then run python -m pydoc -w on a module to inspect the generated page. Done means released output includes the viewport meta tag and narrow screens stack the navigation above the content without overflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, python
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100