forked from readthedocs/sphinx_rtd_theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve scrollbar visibility on navbar on long content
This resolves readthedocs#200, where a scrollbar was sometimes visible on the navbar. This unfortunately wasn't addressable with just CSS, as outlined in readthedocs#206. Because we need the element to be scrollable, we can't set `overflow: hidden` on the nav element. This fixes this issue by: * Adding a `wy-side-scroll` element over the fixed position nav element and under the menu item elements * `wy-side-scroll` is set to 320px width, while the fixed position nav elements and menu item elements are 300px, clipping the scrollbar with `overflow-x: hidden` on the fixed position element * Javascript is set to scroll the new scroll element instead of the parent fixed position element This was tested to be working in both cases on a variety of platforms: Linux FF, Chrome, Windows IE, OSX Chrome and Safari, iPhone 5.1, and Android 4.2.
- Loading branch information
Showing
5 changed files
with
49 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters