Skip to content

Commit 71ecc42

Browse files
committed
Rollup merge of rust-lang#28013 - artemshitov:rustbook-scrolling, r=steveklabnik
As of now, when you open a page in the Rust book and other books made with `rustbook`, you cannot scroll with your keyboard, whether using spacebar or arrow keys, unless you explicitly focus on the content div by clicking. This PR fixes the issue by removing the bound on the content div size and by sticking the TOC with `position: fixed` rather than restricting the content to the window height. r? @steveklabnik
2 parents a3b32eb + b392016 commit 71ecc42

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/rustbook/static/rustbook.css

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ h1, h2, h3, h4, h5, h6 {
2727

2828
@media only screen {
2929
#toc {
30-
position: absolute;
30+
position: fixed;
3131
left: 0px;
3232
top: 0px;
3333
bottom: 0px;
@@ -44,11 +44,9 @@ h1, h2, h3, h4, h5, h6 {
4444

4545
#page-wrapper {
4646
position: absolute;
47-
overflow-y: auto;
4847
left: 310px;
4948
right: 0px;
5049
top: 0px;
51-
bottom: 0px;
5250
box-sizing: border-box;
5351
background: none repeat scroll 0% 0% #FFF;
5452
-webkit-overflow-scrolling: touch;

0 commit comments

Comments
 (0)