make sidebar stay in view while scrolling?
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 250
- Forks
- 102
- Avg merge
- 11d 11h
- Merged PRs (30d)
- 1
Description
At first I found it more convenient if the sidebar (containing table of contents and navigation box) stays in view while scrolling the main content.
I tried modifying the related css file (manual-style.css) by changing the "position" attribute from "absolute" to "fixed".
$ git diff
diff --git a/scribble-lib/scribble/manual-style.css b/scribble-lib/scribble/manual-style.css
index 1327c9a..0fcd65b 100644
--- a/scribble-lib/scribble/manual-style.css
+++ b/scribble-lib/scribble/manual-style.css
@@ -182,7 +182,7 @@ a:hover {
}
.navsettop {
- position: absolute;
+ position: fixed;
top: 0;
left: 0;
margin-bottom: 0;
@@ -393,7 +393,7 @@ a:hover {
/* Table of contents, left margin */
.tocset {
- position: absolute;
+ position: fixed;
float: none;
left: 0;
top: 0rem;
But soon I noticed that if the table of contents in the sidebar gets too long while the "position" is "fixed", the sidebar won't scroll at all. So the bottom part of of the sidebar could never be seen.
Is there a way to deal with this? I'm not sure if css can do this, but an idea is to add a floating "go to top of page" button in case that the sidebar is scrolled out of sight. The point is to make it more convenient for users who wants to find and click a link in the table-of-contents within the sidebar.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in scribble-lib/scribble/manual-style.css by examining the .navsettop and .tocset rules and the supplied fixed-position experiment. Test a long table of contents while scrolling the main content; the work is done when the sidebar remains convenient to use and every table-of-contents link remains accessible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100