rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
17.71k stars 1.61k forks source link

Sidebar not collapsing #2217

Closed rsteube closed 11 months ago

rsteube commented 11 months ago

Problem

In v0.4.35 the sidebar isn't collapsable anymore. Works in v0.4.34.

Steps

  1. mdbook serve --open
  2. click on menu icon (burger)

Possible Solution(s)

No response

Notes

No response

Version

v0.4.35
ehuss commented 11 months ago

Can you share which browser, which version, and which OS you are running on? Do you have any browser extensions installed?

rsteube commented 11 months ago

Linux (Manjaro Sway):

Android:

ehuss commented 11 months ago

And just to confirm, this is happening on https://rust-lang.github.io/mdBook/?

rsteube commented 11 months ago

And just to confirm, this is happening on https://rust-lang.github.io/mdBook/?

No, it doesn't. It works there.

ehuss commented 11 months ago

Can you share where it doesn't work? Does that book have a custom theme? Has it been updated?

rsteube commented 11 months ago

Ah, totally forgot about that. A fresh initialized mdbook works, and updating the theme files do so as well.

Sorry for the trouble.

micahsnyder commented 10 months ago

@ehuss we ran into this issue with the https://github.com/Cisco-Talos/clamav-documentation project documentation. Mdbook v0.4.34 works correctly, but v0.4.35 the sidebar will not collapse and lays on top of the book text when the browser window is too narrow. I just pushed a commit to revert to build the docs.clamav.net page with v0.4.34 until we can fix it.

rsteube commented 10 months ago

@micahsnyder here's how it was done in catppuccin: https://github.com/catppuccin/mdBook/commit/55e872267de2c63e91659c6be5eac1be4fc34540

micahsnyder commented 10 months ago

Thanks @rsteube I just did something similar and it appears to have fixed the issue: https://github.com/Cisco-Talos/clamav-documentation/commit/47875401b7659ac23e8d0e0aaf264acc127025b6