mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

The table of contents is unusable because the buttons to go back to the previous chapter and the table of contents overlap.

Open Seasawher opened this issue 1 year ago • 1 comments

Problem

mdbook_overlap

Steps

  1. install mdbook
  2. create SUMMARY.md
  3. run mdbook serve --open

Possible Solution(s)

The button to go back to the previous chapter should not cover the table of contents.

Notes

This did not happen in earlier versions of the mdbook. (for example, 0.4.32 does not have this bug)

my code is here: https://github.com/lean-ja/tactic-cheatsheet

Version

> mdbook --vesrion
mdbook v0.4.37

Seasawher avatar Apr 07 '24 10:04 Seasawher

Are you using custom CSS? We were having the same issue and tracked this down to some CSS changes in newer versions of mdBook. I was able to diff the CSS in our theme/css/variables.css file with the latest CSS variables in mdbook and noticed that some new variables were introduced. I added the following vars to the :root selector and everything works correctly now:

--sidebar-resize-indicator-width: 8px;
--sidebar-resize-indicator-space: 2px; 

Dillonmcewan avatar Oct 31 '24 21:10 Dillonmcewan