Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attach sidebar-close handler to current-page links
This is intended primarily to resolve a problem with `singlehtml` documentation projects when viewed on narrow (typically mobile) displays. Under those circumstances, the `.current` CSS selector does not match any sidebar menu elements, because there is no logical notion of a 'current' page in `singlehtml` -- every item is on the same page. Therefore this change proposes an alternative way to identify sidebar links that are 'current' -- it checks for anchors that have an `href` beginning with the query-string fragment identifier (`#`). This is intended to be compatible with both `singlehtml` and `html` project builds. It depends upon sphinx-doc/sphinx#12551
- Loading branch information