Commit c842b5d
committed
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
rust-lang#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.
rust-lang#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.1 parent 0ac89dd commit c842b5d
2 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
519 | 518 | | |
520 | 519 | | |
521 | 520 | | |
| |||
548 | 547 | | |
549 | 548 | | |
550 | 549 | | |
551 | | - | |
| 550 | + | |
552 | 551 | | |
553 | 552 | | |
554 | 553 | | |
| |||
562 | 561 | | |
563 | 562 | | |
564 | 563 | | |
565 | | - | |
| 564 | + | |
566 | 565 | | |
567 | 566 | | |
568 | 567 | | |
| |||
594 | 593 | | |
595 | 594 | | |
596 | 595 | | |
597 | | - | |
| 596 | + | |
598 | 597 | | |
599 | 598 | | |
600 | 599 | | |
601 | 600 | | |
602 | 601 | | |
603 | 602 | | |
604 | | - | |
| 603 | + | |
605 | 604 | | |
606 | 605 | | |
607 | 606 | | |
| |||
610 | 609 | | |
611 | 610 | | |
612 | 611 | | |
613 | | - | |
| 612 | + | |
614 | 613 | | |
615 | 614 | | |
616 | 615 | | |
| |||
0 commit comments