-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix scroll and put nav visually "in front" for narrow/mobile screens #863
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -502,7 +502,6 @@ article section.docstring a.source-link { | |
@media only screen and (max-width: 768px) { | ||
nav.toc { | ||
position: fixed; | ||
overflow-y: scroll; | ||
width: 16em; | ||
left: -16em; | ||
-webkit-overflow-scrolling: touch; | ||
|
@@ -513,6 +512,11 @@ article section.docstring a.source-link { | |
-webkit-transition-timing-function: ease-out; /* Safari */ | ||
transition-timing-function: ease-out; | ||
z-index: 2; | ||
box-shadow: 5px 0px 5px 0px rgb(210,210,210); | ||
} | ||
|
||
nav.toc > ul { | ||
overflow-y: scroll; | ||
} | ||
|
||
nav.toc.show { | ||
|
@@ -560,7 +564,7 @@ article section.docstring a.source-link { | |
} | ||
|
||
article > header div#topbar span { | ||
position: fixed; | ||
position: relative; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It appears to work properly like this (on Chrome), but I agree that it doesn't make much sense logically. As we're not setting any position values, couldn't we get rid of |
||
width: 80%; | ||
height: 1.5em; | ||
margin-top: -0.1em; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle, I think we could just use
overflow-y: auto
, so the scroll bar only shows up when needed. But I don't know if there was a rationale behind usingscroll
onnav.toc
before.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
auto
looks better actually. The scrollbar, at least with the-webkit-*
styling I applied, creates this visible bar next to the currently selected item part, which nicely goes away if there is no need for a scrollbar.