Table of contents should be sticky
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Manpage Repository |
New
|
Undecided
|
Unassigned |
Bug Description
When scrolling down with visible table of contents (larger viewport sizes) on pages such as
http://
the table of contents moves out of view which complicates navigation. I propose adding CSS similar to the following:
#toc {
position: sticky;
top: 0;
max-height: 100vh;
overflow: auto;
}
This makes the ToC stick in position for current browsers. Additionally, large ToCs become scrollable, which may be required if the TOC doesn't fit the screen, like on
http://
For old browsers not supporting some of the properties, this should break pretty gracefully.
A nice addition would be to highlight the currently visible section(s), but this would be a separate feature and probably require a bit of JS.