Skip to content

fix: remove duplicate sidebar toggles from navbar header - #1000

Open
hwhsu1231 wants to merge 1 commit into
executablebooks:mainfrom
hwhsu1231-fork:fix/sidebar-toggle
Open

hwhsu1231 wants to merge 1 commit into
executablebooks:mainfrom
hwhsu1231-fork:fix/sidebar-toggle

Conversation

@hwhsu1231

@hwhsu1231 hwhsu1231 commented Sep 19, 2026

Copy link
Copy Markdown

Override sections/header.html to drop the primary/secondary toggle buttons that pydata-sphinx-theme 0.20.0 renders in the top navbar.

Those navbar toggles are a second set of .primary-toggle / .secondary-toggle in the DOM, and the theme JS binds the first match via querySelector(). On wide screens the navbar toggles are hidden by CSS, so the visible article-header toggles stopped working.

With the navbar toggles removed, only the article-header toggles remain, restoring sphinx-book-theme<=1.2.0 behavior.

Fixes #999 (comment)
Fixes #935
Fixes #988
Closes #991

Override `sections/header.html` to drop the primary/secondary toggle
buttons that pydata-sphinx-theme 0.20.0 renders in the top navbar.

Those navbar toggles are a second set of `.primary-toggle` /
`.secondary-toggle` in the DOM, and the theme JS binds the first match
via `querySelector()`. On wide screens the navbar toggles are hidden by
CSS, so the visible article-header toggles stopped working.

With the navbar toggles removed, only the article-header toggles remain,
restoring `sphinx-book-theme<=1.2.0` behavior.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant