executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
409 stars 196 forks source link

No secondary-toggle or bd-sidebar-secondary toc when screen is between 1200 px and 990 px #835

Open 72757373656c6c opened 2 months ago

72757373656c6c commented 2 months ago

Describe the bug

context When the screen size is between 1200 px and 990 px, both secondary-toggle and bd-sidebar-secondary are not visable, so there is no TOC.

expectation I expected either secondary-toggle or bd-sidebar-secondary to be visible.

bug But instead, neither were visible when the screen size was between 1200 px and 990 px.

This is the secondary-toggle, whereas issue #721 is the primary toggle.

I came across this issue when trying to find a way to always show the secondary-toggle and allow bd-sidebar-secondary to toggle regardless of screen size. This is a very useful feature for large screens too. I would also like pst-back-to-top to be visible for large screens. Please consider making these configurable options in conf.py.

Reproduce the bug

To isolate the environment, I created a new Sphinx-MyST project and added one document.

conf.py changes:

extensions = ["myst_parser",]
myst_enable_extensions = ["colon_fence", "deflist",]
source_suffix = { ".md": "markdown" }
html_theme = 'sphinx_book_theme'

Ran make clean; make html.

While viewing the html output in Firefox and Chrome browsers, I grabbed the right-side of the browser window and pulled it left. As I pulled the window left, bd-sidebar-secondary disappeared but the secondary-toggle did not appear. This range was 1200px to 990px.

I took snapshots of the browser window and ruler at the various points:

secondary-toggle_bd-sidebar-secondary

List your environment

Sphinx 7.2.6 Sphinx Book Theme 1.1.2 Linux Arch/Manjaro