No description
Find a file
Eric Huss c842b5d06e Fix sidebar animation and other behavior
This fixes several issues with how the sidebar was behaving:

- Manually resizing the sidebar was incorrectly applying transition
  animations to the page-wrapper causing awkward movement.
- Clicking the sidebar toggle caused the menu bar to behave differently
  compared to loading a page with the sidebar visible or hidden.
- page-wrapper animation wasn't working when JS was disabled.
- RTL sidebar animation was broken.

Most of these issues stem from
https://github.com/rust-lang/mdBook/pull/2454 which moved `js` and
`sidebar-visible` classes from `<body>` to `<html>`, but failed to
update some of the JS and CSS code that was still assuming it was on the
body.

https://github.com/rust-lang/mdBook/pull/1641 previously moved `js` from
`<html>` to `<body>` with the reasoning
"This will be necessary for using CSS selectors on root attributes.".
However, I don't see how that is absolutely necessary, since selectors
like `[dir=rtl].js` should work to select the root element.
2025-07-14 14:24:32 -07:00
.github Update dependencies 2025-05-23 07:55:10 -07:00
ci Test more targets. 2024-05-16 17:27:28 -07:00
examples Fix clippy lint for 1.88 2025-05-14 18:18:45 -07:00
guide add another link type 2025-05-30 21:18:11 +02:00
src Fix sidebar animation and other behavior 2025-07-14 14:24:32 -07:00
test_book fixed typo 'isn't is?' -> 'isn't it?' in test_book/src/individual/code.md 2025-06-08 23:42:42 +03:00
tests Add check that text in collapsed sidebar cannot be found 2025-07-07 21:34:47 +02:00
.eslintrc.json Fix eslint errors 2025-03-31 11:50:13 -07:00
.gitattributes Mark more font files as binary 2025-04-05 20:41:36 -04:00
.gitignore Add testsuite book directories to ignore list 2025-04-22 21:11:54 -07:00
Cargo.lock Update to 0.4.51 2025-05-26 11:01:12 -07:00
Cargo.toml Update to 0.4.51 2025-05-26 11:01:12 -07:00
CHANGELOG.md Update to 0.4.51 2025-05-26 11:01:12 -07:00
CODE_OF_CONDUCT.md add explicit code of conduct, copying other rust-lang repos 2021-07-26 11:52:24 -07:00
CONTRIBUTING.md fix: invalid heading order in CONTRIBUTING.md 2025-05-23 07:46:40 -07:00
LICENSE Create LICENSE 2015-07-29 01:11:30 +02:00
package.json Update browser-ui-test version to 0.21.1 2025-07-07 21:34:33 +02:00
README.md README.md: update workflow status badge 2025-02-13 11:01:08 -05:00
release.toml Metadata for cargo-release should be in release.toml (#722) 2018-07-09 18:36:55 +08:00
triagebot.toml Add more triagebot features 2025-03-23 13:04:10 -07:00

mdBook

CI Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.