documentationjs / documentationjs/documentation
Make the default theme responsive (stack sidebar on narrow screens)
- Dominant language
- JavaScript
- Stars
- 5.8k
- Forks
- 481
- PR merge metrics
- No merged PRs in 30d
Description
### Make the default theme responsive (stack sidebar on narrow screens)
#### Summary
The default theme (`src/default_theme`) is not responsive on narrow screens. A viewport meta tag is present (`index._` line 7), but the layout relies on Split.js which hard-codes a two-pane split via inline styles, and there are no mobile media queries to collapse it.
#### Reproduction
1. Run `documentation build index.js -f html -o docs/api` on any project.
2. Open `docs/api/index.html` in a browser and narrow the window to phone width (e.g. 375px), or open it from a phone.
The TOC (`#split-left`) stays fixed at ~33% of the width and the content (`#split-right`) at ~67%. Neither is usable: the sidebar squeezes the content and there is no way to hide/collapse it.
#### Root cause
- `src/default_theme/index._` renders:
- `
Contributor guide
Assessment
This issue has not been assessed yet.